Skip to content

Commit

Permalink
apacheGH-43396: [Java] Remove/replace jsr305
Browse files Browse the repository at this point in the history
jsr305 is not maintained anymore and is unlikely to support JPMS. The
classes are also in the javax. namespace which is known to cause issues
as well.

Replace most uses of jsr305 with the equivalent checker framework
annotations, and remove usage of @threadsafe.
  • Loading branch information
laurentgo committed Jul 23, 2024
1 parent ec58e4d commit ed2966b
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 18 deletions.
1 change: 0 additions & 1 deletion java/flight/flight-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
requires io.netty.common;
requires io.netty.handler;
requires io.netty.transport;
requires jsr305;
requires org.apache.arrow.format;
requires org.apache.arrow.memory.core;
requires org.apache.arrow.vector;
Expand Down
6 changes: 2 additions & 4 deletions java/flight/flight-sql-jdbc-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,8 @@ under the License.
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>compile</scope>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.arrow.driver.jdbc.client.utils.ClientAuthenticationUtils;
import org.apache.arrow.flight.CallOption;
import org.apache.arrow.flight.CallStatus;
Expand Down Expand Up @@ -61,6 +60,7 @@
import org.apache.arrow.vector.VectorSchemaRoot;
import org.apache.arrow.vector.types.pojo.Schema;
import org.apache.calcite.avatica.Meta.StatementType;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
4 changes: 0 additions & 4 deletions java/memory/memory-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ under the License.
<description>Core off-heap memory management libraries for Arrow ValueVectors.</description>

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
1 change: 0 additions & 1 deletion java/memory/memory-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

requires java.compiler;
requires transitive jdk.unsupported;
requires jsr305;
requires static org.checkerframework.checker.qual;
requires static org.immutables.value.annotations;
requires org.slf4j;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
package org.apache.arrow.memory;

import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.concurrent.ThreadSafe;
import org.apache.arrow.util.Preconditions;
import org.checkerframework.checker.nullness.qual.Nullable;

/**
* Provides a concurrent way to manage account for memory usage without locking. Used as basis for
* Allocators. All operations are threadsafe (except for close).
*/
@ThreadSafe
class Accountant implements AutoCloseable {

/** The parent allocator. */
Expand Down
5 changes: 0 additions & 5 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ under the License.
<artifactId>flatbuffers-java</artifactId>
<version>${dep.fbs.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down

0 comments on commit ed2966b

Please sign in to comment.