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>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
<scope>compile</scope>
</dependency>
<!-- Gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6.2</version>
<scope>provided</scope>
</dependency>

View File

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