mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-01 04:09:08 +01:00
fix code smells
This commit is contained in:
@@ -30,7 +30,6 @@ import de.otto.edison.hal.Links;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import sonia.scm.repository.Signature;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
@@ -38,6 +38,7 @@ import java.util.Set;
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@SuppressWarnings("squid:S2160")
|
||||
public class SignatureDto extends HalRepresentation {
|
||||
|
||||
private String keyId;
|
||||
|
||||
@@ -135,7 +135,7 @@ public final class RepositoryServiceFactory {
|
||||
public RepositoryServiceFactory(ScmConfiguration configuration,
|
||||
CacheManager cacheManager, RepositoryManager repositoryManager,
|
||||
Set<RepositoryServiceResolver> resolvers, PreProcessorUtil preProcessorUtil,
|
||||
Set<ScmProtocolProvider> protocolProviders, WorkdirProvider workdirProvider) {
|
||||
@SuppressWarnings("rawtypes") Set<ScmProtocolProvider> protocolProviders, WorkdirProvider workdirProvider) {
|
||||
this(
|
||||
configuration, cacheManager, repositoryManager, resolvers,
|
||||
preProcessorUtil, protocolProviders, workdirProvider, ScmEventBus.getInstance()
|
||||
@@ -348,9 +348,7 @@ public final class RepositoryServiceFactory {
|
||||
}
|
||||
|
||||
RepositoryCacheKeyPredicate predicate = new RepositoryCacheKeyPredicate(repositoryId);
|
||||
caches.forEach((cache) -> {
|
||||
cache.removeAll(predicate);
|
||||
});
|
||||
caches.forEach(cache -> cache.removeAll(predicate));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import sonia.scm.ContextEntry;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("squid:S110")
|
||||
public class NotPublicKeyException extends BadRequestException {
|
||||
public NotPublicKeyException(List<ContextEntry> context, String message) {
|
||||
super(context, message);
|
||||
|
||||
@@ -27,6 +27,7 @@ package sonia.scm.security.gpg;
|
||||
import sonia.scm.BadRequestException;
|
||||
import sonia.scm.ContextEntry;
|
||||
|
||||
@SuppressWarnings("squid:S110")
|
||||
public final class DeletingReadonlyKeyNotAllowedException extends BadRequestException {
|
||||
|
||||
public DeletingReadonlyKeyNotAllowedException(String keyId) {
|
||||
|
||||
@@ -41,7 +41,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.security.Security;
|
||||
|
||||
public class GPGKeyPairGeneratorTest {
|
||||
class GPGKeyPairGeneratorTest {
|
||||
|
||||
private static void registerBouncyCastleProviderIfNecessary() {
|
||||
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
|
||||
|
||||
Reference in New Issue
Block a user