Compare commits

...

1 Commits

Author SHA1 Message Date
Giambattista Bloisi ad98cf0220 Change pom.xml to compile with scala 2.12
Rename 'isBlank' bean methods to 'hasBlankValues': it is required to remain compatible with Spark 3 bean Encoder that interprets 'isBlank' as a field getter and then generates failures for the missing setter
2023-07-10 15:17:21 +02:00
5 changed files with 10 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId>
<artifactId>dhp-schemas_${scala.binary.version}</artifactId>
<packaging>jar</packaging>
<version>3.17.2-SNAPSHOT</version>
@ -226,7 +226,7 @@
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.0.1</version>
<version>4.8.1</version>
<executions>
<execution>
<id>scala-compile-first</id>
@ -482,7 +482,8 @@
<dhp.jackson.version>2.9.6</dhp.jackson.version>
<dhp.commons.lang.version>3.5</dhp.commons.lang.version>
<dhp.guava.version>11.0.2</dhp.guava.version>
<scala.version>2.11.12</scala.version>
<scala.version>2.12.18</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<junit-jupiter.version>5.6.1</junit-jupiter.version>
<mockito-core.version>3.3.3</mockito-core.version>
<jsonschemagenerator.version>4.13.0</jsonschemagenerator.version>

View File

@ -40,12 +40,12 @@ public class GeoLocation implements Serializable {
}
@JsonIgnore
public boolean isBlank() {
public boolean hasBlankValues() {
return StringUtils.isBlank(point) && StringUtils.isBlank(box) && StringUtils.isBlank(place);
}
public String toComparableString() {
return isBlank()
return hasBlankValues()
? ""
: String
.format(

View File

@ -40,7 +40,7 @@ public class KeyValue implements Serializable {
}
public String toComparableString() {
return isBlank()
return hasBlankValues()
? ""
: String
.format(
@ -49,7 +49,7 @@ public class KeyValue implements Serializable {
}
@JsonIgnore
public boolean isBlank() {
public boolean hasBlankValues() {
return StringUtils.isBlank(key) && StringUtils.isBlank(value);
}

View File

@ -47,7 +47,7 @@ public class Qualifier implements Serializable {
}
public String toComparableString() {
return isBlank()
return hasBlankValues()
? ""
: String
.format(
@ -59,7 +59,7 @@ public class Qualifier implements Serializable {
}
@JsonIgnore
public boolean isBlank() {
public boolean hasBlankValues() {
return StringUtils.isBlank(classid)
&& StringUtils.isBlank(classname)
&& StringUtils.isBlank(schemeid)

View File

@ -164,5 +164,4 @@ public class Relation extends Oaf {
public int hashCode() {
return Objects.hash(relType, subRelType, relClass, source, target, collectedfrom);
}
}