applied intellij code cleanup

This commit is contained in:
Claudio Atzori 2021-05-14 11:06:24 +02:00
parent 0e5cf7a7d8
commit 1271bec1f8
6 changed files with 6 additions and 9 deletions

View File

@ -26,7 +26,7 @@ import eu.dnetlib.dhp.schema.oaf.*;
public class ModelSupport {
/** Defines the mapping between the actual entity type and the main entity type */
private static Map<EntityType, MainEntityType> entityMapping = Maps.newHashMap();
private static final Map<EntityType, MainEntityType> entityMapping = Maps.newHashMap();
static {
entityMapping.put(EntityType.publication, MainEntityType.result);

View File

@ -32,7 +32,7 @@ public class Context extends Qualifier {
@Override
public int hashCode() {
String provenance = new String();
String provenance = "";
this.provenance.forEach(p -> provenance.concat(p.toString()));
return Objects.hash(getCode(), getLabel(), provenance);
}

View File

@ -22,7 +22,7 @@ public class AccessRight extends Qualifier {
String s = super.toComparableString();
return Optional
.ofNullable(getOpenAccessRoute())
.map(x -> s + "::" + x.toString())
.map(x -> s + "::" + x)
.orElse(s);
}

View File

@ -37,10 +37,7 @@ public class CleaningFunctions {
if (CleaningFunctions.PID_BLACKLIST.contains(pidValue)) {
return false;
}
if (PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue)) {
return false;
}
return true;
return !PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue);
}
/**

View File

@ -11,7 +11,7 @@ import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
public class PidComparator<T extends OafEntity> implements Comparator<StructuredProperty> {
private T entity;
private final T entity;
public PidComparator(T entity) {
this.entity = entity;

View File

@ -16,7 +16,7 @@ import eu.dnetlib.dhp.schema.oaf.Publication;
public class IdentifierFactoryTest {
private static ObjectMapper OBJECT_MAPPER = new ObjectMapper()
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
@Test