Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DependencyConstraints {
// Some of these are referenced below as well
deps.put("antlr.version", "2.7.7")
deps.put("commons-io.version", "2.15.1")
deps.put("commons-lang3.version", "3.12.0")
deps.put("commons-lang3.version", "3.18.0")
deps.put("commons-validator.version", "1.7")
deps.put("fastutil.version", "8.5.8")
deps.put("javax.transaction-api.version", "1.3")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void parametersOverrideCacheXml() throws IOException {
Boolean configurationLineFound = Boolean.FALSE;
LineIterator lineIterator = FileUtils.lineIterator(logFile.toFile());
while (lineIterator.hasNext()) {
String line = lineIterator.nextLine();
String line = lineIterator.next();
if (line.contains("CacheServer Configuration:")) {
configurationLineFound = Boolean.TRUE;
assertThat(line).contains("max-threads=100");
Expand Down Expand Up @@ -152,7 +152,7 @@ public void usesClusterConfigurationIfEnabled() throws IOException {
boolean configurationLineFound = false;
LineIterator lineIterator = FileUtils.lineIterator(logFile.toFile());
while (lineIterator.hasNext()) {
String line = lineIterator.nextLine();
String line = lineIterator.next();
if (line.contains("CacheServer Configuration:")) {
configurationLineFound = true;
assertThat(line).contains("max-threads=50");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public void handleTerminationWithUnregisterClientShouldNullClientAuths() {
ClientUserAuths clientUserAuths = mock(ClientUserAuths.class);
ServerConnection spy = spy(serverConnection);
Map<ServerSideHandshake, MutableInt> cleanupTable = mock(Map.class);
when(cleanupTable.get(any())).thenReturn(mock(MutableInt.class));
when(cleanupTable.get(any())).thenReturn(new MutableInt(0));
doReturn(cleanupTable).when(clientHealthMonitor).getCleanupTable();
doReturn(new HashMap<>()).when(clientHealthMonitor).getCleanupProxyIdTable();
spy.setClientUserAuths(clientUserAuths);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public ResultModel connect(
.createInfo("Already connected to: " + getGfsh().getOperationInvoker().toString());
}

if (StringUtils.startsWith(url, "https")) {
if (url != null && url.startsWith("https")) {
useSsl = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;
import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;

Expand Down Expand Up @@ -169,7 +168,8 @@ public ResultModel createIndex(@CliOption(key = CliStrings.CREATE_INDEX__NAME, m
// returned here should not have "."
String getValidRegionName(String regionPath) {
String regionName = regionPath.trim().split(" ")[0];
regionName = StringUtils.removeStart(regionName, SEPARATOR);
regionName =
regionName.startsWith(SEPARATOR) ? regionName.substring(SEPARATOR.length()) : regionName;
if (regionName.contains(".")) {
regionName = regionName.substring(0, regionName.indexOf('.'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ DataCommandResult select(String query, DistributedMember targetMember) {

boolean limitAdded = false;

if (!StringUtils.containsIgnoreCase(query, " limit")
&& !StringUtils.containsIgnoreCase(query, " count(")) {
if (!query.toLowerCase().contains(" limit")
&& !query.toLowerCase().contains(" count(")) {
query = query + " limit " + CommandExecutionContext.getShellFetchSize();
limitAdded = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
package org.apache.geode.management.internal.cli.domain;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;
import java.util.Objects;

import org.apache.geode.cache.FixedPartitionAttributes;

Expand All @@ -37,7 +36,7 @@ public boolean equals(Object obj) {
if (obj instanceof FixedPartitionAttributesInfo) {
FixedPartitionAttributesInfo fpaInfo = (FixedPartitionAttributesInfo) obj;
return numBuckets == fpaInfo.getNumBuckets()
&& StringUtils.equals(partitionName, fpaInfo.getPartitionName())
&& Objects.equals(partitionName, fpaInfo.getPartitionName())
&& isPrimary == fpaInfo.isPrimary();

} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import java.util.Objects;

import org.apache.geode.cache.FixedPartitionAttributes;
import org.apache.geode.cache.PartitionAttributes;
Expand Down Expand Up @@ -152,9 +151,9 @@ public List<FixedPartitionAttributesInfo> getFixedPartitionAttributesInfo() {
public boolean equals(Object obj) {
if (obj instanceof PartitionAttributesInfo) {
PartitionAttributesInfo paInfo = (PartitionAttributesInfo) obj;
return StringUtils.equals(getColocatedWith(), paInfo.getColocatedWith())
return Objects.equals(getColocatedWith(), paInfo.getColocatedWith())
&& getLocalMaxMemory() == paInfo.getLocalMaxMemory()
&& StringUtils.equals(getPartitionResolverName(), paInfo.getPartitionResolverName())
&& Objects.equals(getPartitionResolverName(), paInfo.getPartitionResolverName())
&& getRecoveryDelay() == paInfo.getRecoveryDelay()
&& getRedundantCopies() == paInfo.getRedundantCopies()
&& getStartupRecoveryDelay() == paInfo.getStartupRecoveryDelay()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -364,7 +365,7 @@ public Map<String, String> getNonDefaultAttributes() {
Boolean.toString(cloningEnabled));
}

if (!StringUtils.equals(RegionAttributesDefault.COMPRESSOR_CLASS_NAME, compressorClassName)) {
if (!Objects.equals(RegionAttributesDefault.COMPRESSOR_CLASS_NAME, compressorClassName)) {
nonDefaultAttributes.put(RegionAttributesNames.COMPRESSOR, compressorClassName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public String getRegionName() {
}

String regionName = regionPath.trim().split(" ")[0];
regionName = StringUtils.removeStart(regionName, SEPARATOR);
regionName =
regionName.startsWith(SEPARATOR) ? regionName.substring(SEPARATOR.length()) : regionName;
if (regionName.contains(".")) {
regionName = regionName.substring(0, regionName.indexOf('.'));
}
Expand Down