removed guava

This commit is contained in:
Michele Artini 2020-07-08 10:01:54 +02:00
parent 29a2f1577c
commit 845abc6c9c
2 changed files with 7 additions and 16 deletions

View File

@ -13,18 +13,10 @@
<dependencies> <dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
<scope>compile</scope>
</dependency>
<!-- Gson --> <!-- Gson -->
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
<version>2.6.2</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@ -1,8 +1,7 @@
package eu.dnetlib.broker.objects; package eu.dnetlib.broker.objects;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects;
import com.google.common.base.Objects;
/** /**
* Created by claudio on 22/07/16. * Created by claudio on 22/07/16.
@ -56,16 +55,16 @@ public class OaBrokerInstance implements Serializable {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hashCode(getUrl(), getLicense(), getHostedby(), getInstancetype()); return Objects.hash(hostedby, instancetype, license, url);
} }
@Override @Override
public boolean equals(final Object obj) { public boolean equals(final Object obj) {
if (this == obj) { return true; }
if (!(obj instanceof OaBrokerInstance)) { return false; } if (!(obj instanceof OaBrokerInstance)) { return false; }
final OaBrokerInstance that = (OaBrokerInstance) obj; final OaBrokerInstance other = (OaBrokerInstance) obj;
return Objects.equal(getUrl(), that.getUrl()) && return Objects.equals(hostedby, other.hostedby) && Objects.equals(instancetype, other.instancetype) && Objects.equals(license, other.license)
Objects.equal(getLicense(), that.getLicense()) && && Objects.equals(url, other.url);
Objects.equal(getHostedby(), that.getHostedby()) &&
Objects.equal(getInstancetype(), that.getInstancetype());
} }
} }