Skip to content

Commit 96b139c

Browse files
committed
Replace com.google.common.base.Objects.equal() by java.util.Objects.equal()
1 parent dd9575e commit 96b139c

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

geowebcache/core/src/main/java/org/geowebcache/filter/parameters/ParameterFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
*/
1414
package org.geowebcache.filter.parameters;
1515

16-
import com.google.common.base.Objects;
1716
import com.google.common.base.Preconditions;
1817
import java.io.Serializable;
1918
import java.util.List;
19+
import java.util.Objects;
2020
import java.util.Optional;
2121
import javax.annotation.Nullable;
2222
import javax.annotation.ParametersAreNonnullByDefault;
@@ -127,7 +127,7 @@ protected Object readResolve() {
127127

128128
/** Is the given value exactly a value that could be produced by the filter. */
129129
public boolean isFilteredValue(final String value) {
130-
if (Objects.equal(value, this.getDefaultValue())) {
130+
if (Objects.equals(value, this.getDefaultValue())) {
131131
return true;
132132
}
133133
if (Optional.ofNullable(this.getLegalValues())
@@ -136,7 +136,7 @@ public boolean isFilteredValue(final String value) {
136136
return true;
137137
}
138138
try {
139-
return Objects.equal(value, this.apply(value));
139+
return Objects.equals(value, this.apply(value));
140140
} catch (ParameterException ex) {
141141
return false;
142142
}

geowebcache/core/src/main/java/org/geowebcache/layer/TileLayer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414
package org.geowebcache.layer;
1515

16-
import com.google.common.base.Objects;
1716
import java.io.IOException;
1817
import java.util.ArrayList;
1918
import java.util.Arrays;
@@ -22,6 +21,7 @@
2221
import java.util.Iterator;
2322
import java.util.List;
2423
import java.util.Map;
24+
import java.util.Objects;
2525
import java.util.Set;
2626
import java.util.logging.Level;
2727
import java.util.logging.Logger;
@@ -302,7 +302,7 @@ public FormatModifier getFormatModifier(MimeType responseFormat) {
302302
Iterator<FormatModifier> iter = formatModifiers.iterator();
303303
while (iter.hasNext()) {
304304
FormatModifier mod = iter.next();
305-
if (Objects.equal(mod.getResponseFormat(), responseFormat)) {
305+
if (Objects.equals(mod.getResponseFormat(), responseFormat)) {
306306
return mod;
307307
}
308308
}

geowebcache/diskquota/bdb/src/main/java/org/geowebcache/diskquota/bdb/BDBQuotaStore.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import static org.geowebcache.diskquota.DiskQuotaMonitor.GWC_DISKQUOTA_DISABLED;
1717
import static org.geowebcache.util.FileUtils.listFilesNullSafe;
1818

19-
import com.google.common.base.Objects;
2019
import com.sleepycat.je.CursorConfig;
2120
import com.sleepycat.je.Environment;
2221
import com.sleepycat.je.LockMode;
@@ -34,6 +33,7 @@
3433
import java.util.HashSet;
3534
import java.util.List;
3635
import java.util.Map;
36+
import java.util.Objects;
3737
import java.util.Set;
3838
import java.util.concurrent.Callable;
3939
import java.util.concurrent.ExecutionException;
@@ -397,12 +397,12 @@ public void deleteLayer(final String layerName) {
397397

398398
@Override
399399
public void deleteGridSubset(String layerName, String gridSetId) {
400-
issue(new Deleter(layerName, ts -> Objects.equal(ts.getGridsetId(), gridSetId)));
400+
issue(new Deleter(layerName, ts -> Objects.equals(ts.getGridsetId(), gridSetId)));
401401
}
402402

403403
@Override
404404
public void deleteParameters(String layerName, String parametersId) {
405-
issue(new Deleter(layerName, ts -> Objects.equal(ts.getParametersId(), parametersId)));
405+
issue(new Deleter(layerName, ts -> Objects.equals(ts.getParametersId(), parametersId)));
406406
}
407407

408408
private class Deleter implements Callable<Void> {

geowebcache/diskquota/jdbc/src/test/java/org/geowebcache/diskquota/jdbc/JDBCQuotaStoreTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import static org.junit.Assert.assertTrue;
1111
import static org.junit.Assert.fail;
1212

13-
import com.google.common.base.Objects;
1413
import java.io.File;
1514
import java.io.IOException;
1615
import java.math.BigInteger;
@@ -25,6 +24,7 @@
2524
import java.util.HashSet;
2625
import java.util.List;
2726
import java.util.Map;
27+
import java.util.Objects;
2828
import java.util.Set;
2929
import java.util.concurrent.Future;
3030
import java.util.stream.Collectors;
@@ -462,7 +462,7 @@ public void testDeleteParameters() throws InterruptedException {
462462
assertThat(
463463
store.getTileSets(),
464464
containsInAnyOrder(expectedTileSets.stream()
465-
.filter(ts -> !(Objects.equal(ts.getParametersId(), paramIds[1])
465+
.filter(ts -> !(Objects.equals(ts.getParametersId(), paramIds[1])
466466
&& ts.getLayerName().equals(layerName)))
467467
.map(Matchers::equalTo)
468468
.collect(Collectors.toSet())));

geowebcache/wms/src/test/java/org/geowebcache/config/wms/GetCapabilitiesGridSetConfigurationConformanceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
import static org.hamcrest.MatcherAssert.assertThat;
2121
import static org.hamcrest.Matchers.equalTo;
2222

23-
import com.google.common.base.Objects;
2423
import java.util.Collections;
2524
import java.util.LinkedList;
2625
import java.util.List;
26+
import java.util.Objects;
2727
import org.easymock.EasyMock;
2828
import org.geotools.data.ows.OperationType;
2929
import org.geotools.ows.wms.CRSEnvelope;
@@ -148,7 +148,7 @@ protected Matcher<GridSet> infoEquals(int expected) {
148148
@Override
149149
public boolean matches(Object item) {
150150
return item instanceof GridSet
151-
&& Objects.equal(((GridSet) item).getDescription(), Integer.toString(expected));
151+
&& Objects.equals(((GridSet) item).getDescription(), Integer.toString(expected));
152152
}
153153
};
154154
}

0 commit comments

Comments
 (0)