Skip to content

Commit

Permalink
➖ removing unused guava dependency
Browse files Browse the repository at this point in the history
Signed-off-by: dseurotech <[email protected]>
  • Loading branch information
dseurotech committed May 10, 2024
1 parent 1041d8a commit 0edb7bc
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 131 deletions.
4 changes: 0 additions & 4 deletions assembly/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions assembly/console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions consumer/lifecycle-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,6 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>failureaccess</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>listenablefuture</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions consumer/lifecycle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions consumer/telemetry-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>failureaccess</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>listenablefuture</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions consumer/telemetry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions locator/guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
<googleauth.version>1.5.0</googleauth.version>
<gson.version>2.10</gson.version>
<guava.version>32.1.2-jre</guava.version>
<guava-failureaccess.version>1.0.1</guava-failureaccess.version>
<guava-listenablefuture.version>9999.0-empty-to-avoid-conflict-with-guava</guava-listenablefuture.version>
<guice.version>5.1.0</guice.version>
<guice-multibindings.version>4.2.3</guice-multibindings.version>
<hamcrest-core.version>2.2</hamcrest-core.version>
Expand Down Expand Up @@ -1501,16 +1499,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>failureaccess</artifactId>
<version>${guava-failureaccess.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>listenablefuture</artifactId>
<version>${guava-listenablefuture.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions service/account/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-service-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
*******************************************************************************/
package org.eclipse.kapua.service.account.xml;

import com.google.common.base.Strings;
import org.eclipse.kapua.KapuaIllegalArgumentException;
import org.eclipse.kapua.locator.KapuaLocator;
import org.eclipse.kapua.model.id.KapuaIdFactory;
import org.eclipse.kapua.service.account.Account;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import org.eclipse.kapua.KapuaIllegalArgumentException;
import org.eclipse.kapua.locator.KapuaLocator;
import org.eclipse.kapua.model.id.KapuaIdFactory;
import org.eclipse.kapua.service.account.Account;

/**
* {@link Account#getParentAccountPath()} {@link XmlAdapter}.
*
Expand All @@ -35,37 +36,37 @@ public class AccountParentPathXmlAdapter extends XmlAdapter<String, String> {

@Override
public String marshal(String parentAccountPathLong) {
if (Strings.isNullOrEmpty(parentAccountPathLong)) {
return null;
} else {
String[] parentAccountPathLongTokens = parentAccountPathLong.substring(1).split("/");
return Optional.ofNullable(parentAccountPathLong)
.filter(s -> s.length() > 0)
.map(s -> {
String[] parentAccountPathLongTokens = s.substring(1).split("/");

List<String> parentAccountPathBase64List =
Arrays.stream(parentAccountPathLongTokens)
.map(p -> kapuaIdFactory.newKapuaId(new BigInteger(p)).toCompactId())
.collect(Collectors.toList());
List<String> parentAccountPathBase64List =
Arrays.stream(parentAccountPathLongTokens)
.map(p -> kapuaIdFactory.newKapuaId(new BigInteger(p)).toCompactId())
.collect(Collectors.toList());

return "/" + String.join("/", parentAccountPathBase64List);
}
return "/" + String.join("/", parentAccountPathBase64List);
})
.orElse(null);
}

@Override
public String unmarshal(String parentAccountPathBase64) throws KapuaIllegalArgumentException {
if (Strings.isNullOrEmpty(parentAccountPathBase64)) {
if (parentAccountPathBase64 == null || parentAccountPathBase64.length() == 0) {
return null;
} else {
String[] parentAccountPathBase64Tokens = parentAccountPathBase64.substring(1).split("/");
}
String[] parentAccountPathBase64Tokens = parentAccountPathBase64.substring(1).split("/");

try {
List<String> parentAccountPathLongList =
Arrays.stream(parentAccountPathBase64Tokens)
.map(p -> kapuaIdFactory.newKapuaId(p).toStringId())
.collect(Collectors.toList());
try {
List<String> parentAccountPathLongList =
Arrays.stream(parentAccountPathBase64Tokens)
.map(p -> kapuaIdFactory.newKapuaId(p).toStringId())
.collect(Collectors.toList());

return "/" + String.join("/", parentAccountPathLongList);
} catch (IllegalArgumentException e) {
throw new KapuaIllegalArgumentException("account.parentAccountPath", parentAccountPathBase64);
}
return "/" + String.join("/", parentAccountPathLongList);
} catch (IllegalArgumentException e) {
throw new KapuaIllegalArgumentException("account.parentAccountPath", parentAccountPathBase64);
}
}
}
12 changes: 0 additions & 12 deletions service/authentication-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,6 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>failureaccess</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>listenablefuture</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions service/authentication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions service/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions simulator-kura/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
<artifactId>commons-cli</artifactId>
</dependency>

<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;

import com.google.common.base.Function;

public final class Topic {

private static final String APPLICATION_ID = "application-id";
Expand Down Expand Up @@ -172,15 +171,14 @@ public String render(final Map<String, String> context) {
}

/**
* Renders all tokens from {@code fromIndex} (inclusive) to {@code toIndex}
* (exclusive)
* Renders all tokens from {@code fromIndex} (inclusive) to {@code toIndex} (exclusive)
*
* @param fromIndex
* first item to render
* first item to render
* @param toIndex
* first item <strong>not</strong> to render
* first item <strong>not</strong> to render
* @param context
* the additional context to use
* the additional context to use
* @return the rendered string
*/
public String render(final int fromIndex, final int toIndex, final Map<String, String> context) {
Expand All @@ -192,13 +190,12 @@ public String render() {
}

/**
* Renders all tokens from {@code fromIndex} (inclusive) to {@code toIndex}
* (exclusive)
* Renders all tokens from {@code fromIndex} (inclusive) to {@code toIndex} (exclusive)
*
* @param fromIndex
* first item to render
* first item to render
* @param toIndex
* first item <strong>not</strong> to render
* first item <strong>not</strong> to render
* @return the rendered string
*/
public String render(final int fromIndex, final int toIndex) {
Expand Down Expand Up @@ -243,7 +240,7 @@ public static Topic notify(final String requesterClientId, final String... resou
* </p>
*
* @param application
* the application ID
* the application ID
* @return a new topic
*/
public static Topic application(final String application) {
Expand Down Expand Up @@ -278,9 +275,9 @@ public Topic append(final Segment segment) {
* Attach information to the local topic context
*
* @param key
* the key of the value
* the key of the value
* @param value
* the value to attach
* the value to attach
* @return the current instance
*/
public Topic attach(final String key, final String value) {
Expand Down

0 comments on commit 0edb7bc

Please sign in to comment.