Skip to content

Commit

Permalink
Update to airlift 234
Browse files Browse the repository at this point in the history
This change:

- migrates javax.annotation to jakarta.annotation-api and errorprone_annotations
- migrates javax.validation to jakarta.validation-api
  • Loading branch information
wendigo committed Jul 6, 2023
1 parent c976933 commit f838546
Show file tree
Hide file tree
Showing 838 changed files with 1,608 additions and 2,051 deletions.
9 changes: 7 additions & 2 deletions client/trino-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -68,6 +68,11 @@
<artifactId>trino-parser</artifactId>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions client/trino-cli/src/main/java/io/trino/cli/Pager.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
package io.trino.cli;

import com.google.common.collect.ImmutableList;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import java.io.FilterOutputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package io.trino.cli;

import javax.annotation.concurrent.GuardedBy;
import com.google.errorprone.annotations.concurrent.GuardedBy;

import java.io.Closeable;

Expand Down
9 changes: 7 additions & 2 deletions client/trino-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -71,6 +71,11 @@
<version>1.7</version>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.annotations.Immutable;
import io.trino.client.ClientTypeSignatureParameter.ParameterKind;

import javax.annotation.concurrent.Immutable;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;

import java.io.IOException;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;

import static java.util.Objects.requireNonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;

import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkArgument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;
import jakarta.annotation.Nullable;

import java.util.List;
import java.util.regex.Matcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
package io.trino.client;

import com.fasterxml.jackson.core.JsonProcessingException;
import jakarta.annotation.Nullable;
import okhttp3.Headers;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;

import javax.annotation.Nullable;

import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;
import jakarta.annotation.Nullable;

import static com.google.common.base.MoreObjects.toStringHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;
import jakarta.annotation.Nullable;

import java.net.URI;
import java.util.List;
Expand Down
3 changes: 1 addition & 2 deletions client/trino-client/src/main/java/io/trino/client/Row.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
package io.trino.client;

import com.google.common.collect.ImmutableList;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import java.util.List;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package io.trino.client;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import java.util.Objects;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.errorprone.annotations.Immutable;
import io.airlift.units.Duration;

import javax.annotation.concurrent.Immutable;

import java.util.Objects;
import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;

import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package io.trino.client;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import java.io.Closeable;
import java.time.ZoneId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.google.errorprone.annotations.ThreadSafe;
import io.airlift.units.Duration;
import jakarta.annotation.Nullable;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;

import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import com.google.errorprone.annotations.Immutable;
import jakarta.annotation.Nullable;

import java.util.OptionalDouble;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@

import com.google.common.annotations.VisibleForTesting;
import io.trino.client.ClientException;
import jakarta.annotation.Nullable;
import okhttp3.Authenticator;
import okhttp3.Challenge;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.Route;

import javax.annotation.Nullable;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package io.trino.client.auth.external;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

import java.util.Optional;
import java.util.concurrent.locks.Lock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
package io.trino.client.auth.kerberos;

import com.google.common.collect.ImmutableMap;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import com.sun.security.auth.module.Krb5LoginModule;
import org.ietf.jgss.GSSException;

import javax.annotation.concurrent.GuardedBy;
import javax.security.auth.Subject;
import javax.security.auth.login.AppConfigurationEntry;
import javax.security.auth.login.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package io.trino.client.auth.kerberos;

import com.google.common.base.Splitter;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import io.airlift.units.Duration;
import io.trino.client.ClientException;
import okhttp3.Authenticator;
Expand All @@ -27,7 +28,6 @@
import org.ietf.jgss.GSSManager;
import org.ietf.jgss.Oid;

import javax.annotation.concurrent.GuardedBy;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginException;

Expand Down
18 changes: 12 additions & 6 deletions client/trino-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
Expand Down Expand Up @@ -65,6 +69,11 @@
<artifactId>trino-client</artifactId>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
Expand Down Expand Up @@ -349,10 +358,6 @@
<pattern>io.airlift</pattern>
<shadedPattern>${shadeBase}.airlift</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>${shadeBase}.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>jakarta.annotation</pattern>
<shadedPattern>${shadeBase}.jakarta.annotation</shadedPattern>
Expand Down Expand Up @@ -390,6 +395,7 @@
<excludes>
<exclude>org/jetbrains/**</exclude>
<exclude>org/intellij/**</exclude>
<exclude>com/google/errorprone/**</exclude>
<exclude>META-INF/maven/**</exclude>
<exclude>META-INF/services/com.fasterxml.**</exclude>
<exclude>META-INF/proguard/**</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ public Object getObject(int columnIndex)
return column(columnIndex);
}

@javax.annotation.Nullable
private static Object convertFromClientRepresentation(ClientTypeSignature columnType, @javax.annotation.Nullable Object value)
@jakarta.annotation.Nullable
private static Object convertFromClientRepresentation(ClientTypeSignature columnType, @jakarta.annotation.Nullable Object value)
throws SQLException
{
requireNonNull(columnType, "columnType is null");
Expand Down
3 changes: 1 addition & 2 deletions client/trino-jdbc/src/main/java/io/trino/jdbc/Row.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
package io.trino.jdbc;

import com.google.common.collect.ImmutableList;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import java.util.List;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package io.trino.jdbc;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import java.util.Objects;
import java.util.Optional;
Expand Down
Loading

0 comments on commit f838546

Please sign in to comment.