Skip to content

Commit

Permalink
addressing code quality issues EA-3626
Browse files Browse the repository at this point in the history
  • Loading branch information
gsergiu committed Dec 4, 2023
1 parent 50ddd75 commit 58d21c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
Expand All @@ -19,12 +17,10 @@
@PropertySource(value = "translation.user.properties", ignoreResourceNotFound = true)})
public class TranslationConfig{

private static final Logger LOG = LogManager.getLogger(TranslationConfig.class);
/** Matches spring.profiles.active property in test/resource application.properties file */
public static final String ACTIVE_TEST_PROFILE = "test";

@Value("${europeana.apikey.jwttoken.signaturekey:}")
// @Value("${europeana.signaturekey:}")
private String apiKeyPublicKey;

@Value("${authorization.api.name: translations}")
Expand All @@ -36,9 +32,6 @@ public class TranslationConfig{
@Value("${auth.write.enabled: true}")
private boolean authWriteEnabled;

@Value("${spring.profiles.active:}")
private String activeProfileString;

@Value("${europeana.apikey.serviceurl:}")
private String apiKeyUrl;

Expand All @@ -64,7 +57,7 @@ public class TranslationConfig{
private String truststorePass;

public TranslationConfig() {
LOG.info("Initializing TranslConfigProperties bean.");
super();
}

public String getApiKeyPublicKey() {
Expand Down Expand Up @@ -103,10 +96,6 @@ public void setTranslationGoogleProjectId(String googleTranslateProjectId) {
this.googleTranslateProjectId = googleTranslateProjectId;
}

// public static boolean testProfileNotActive(String activeProfileString) {
// return Arrays.stream(activeProfileString.split(",")).noneMatch(ACTIVE_TEST_PROFILE::equals);
// }

/** verify properties */
public void verifyRequiredProperties() {
List<String> missingProps = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public byte[] serialize(Object t) throws SerializationException {
}

@Override
@SuppressWarnings("external_fbcontrib:LEST_LOST_EXCEPTION_STACK_TRACE") // cannot change external interface
@SuppressWarnings({"external_fbcontrib:LEST_LOST_EXCEPTION_STACK_TRACE", "external_fbcontrib:EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS"}) // cannot change external interface
public CachedTranslation deserialize(byte[] bytes) throws SerializationException {
if(bytes == null){
return null;
Expand Down

0 comments on commit 58d21c4

Please sign in to comment.