Skip to content
Closed
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
10 changes: 5 additions & 5 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
strategy:
fail-fast: false
matrix:
jdk: [8, 11, 17, 20]
jdk: [8, 11, 17, 21]
include:
- jdk: 8
title: AMD64 Debian 9 Java JDK 8 Maven 3.5.4
Expand All @@ -71,10 +71,10 @@ jobs:
title: AMD64 Ubuntu 22.04 Java JDK 17 Maven 3.9.3
maven: 3.9.3
image: eclipse-java
- jdk: 20
title: AMD64 Ubuntu 22.04 Java JDK 20 Maven 3.9.3
maven: 3.9.3
image: eclipse-java
- jdk: 21
title: AMD64 Ubuntu 22.04 Java JDK 21 Maven 3.9.4
maven: 3.9.4
image: amazon-java
env:
JDK: ${{ matrix.jdk }}
MAVEN: ${{ matrix.maven }}
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ x-hierarchy:
- debian-java
- debian-js
- eclipse-java
- amazon-java
- fedora-cpp:
- fedora-python
- python-sdist
Expand Down Expand Up @@ -1705,6 +1706,18 @@ services:
volumes: *java-volumes
command: *java-command

amazon-java:
# Usage:
# docker-compose build amazon-java
# docker-compose run amazon-java
# Parameters:
# MAVEN: 3.9.4
# JDK: 21
image: ${ARCH}/maven:${MAVEN}-amazoncorretto-${JDK}
shm_size: *shm-size
volumes: *java-volumes
command: *java-command

############################## Integration ##################################

conda-integration:
Expand Down
4 changes: 2 additions & 2 deletions java/flight/flight-sql-jdbc-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<version>${mockito.core.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>4.11.0</version>
<version>${mockito.inline.version}</version>
<scope>test</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions java/flight/flight-sql-jdbc-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<version>${mockito.core.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>4.11.0</version>
<version>${mockito.inline.version}</version>
<scope>test</scope>
</dependency>

Expand Down
13 changes: 13 additions & 0 deletions java/flight/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,17 @@
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>pin-mockito-jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<mockito.core.version>4.11.0</mockito.core.version>
<mockito.inline.version>4.11.0</mockito.inline.version>
</properties>
</profile>
</profiles>
</project>
4 changes: 3 additions & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
<forkCount>2</forkCount>
<checkstyle.failOnViolation>true</checkstyle.failOnViolation>
<errorprone.javac.version>9+181-r4173-1</errorprone.javac.version>
<error_prone_core.version>2.16</error_prone_core.version>
<error_prone_core.version>2.22.0</error_prone_core.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<mockito.core.version>5.5.0</mockito.core.version>
<mockito.inline.version>5.2.0</mockito.inline.version>
</properties>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ public static ValueVector decode(ValueVector indices, Dictionary dictionary, Buf
* @param valueCount dictionary vector valueCount.
* @return index type.
*/
@SuppressWarnings("ComparisonOutOfRange")
public static ArrowType.Int getIndexType(int valueCount) {
Preconditions.checkArgument(valueCount >= 0);
if (valueCount <= Byte.MAX_VALUE) {
return new ArrowType.Int(8, true);
} else if (valueCount <= Character.MAX_VALUE) {
return new ArrowType.Int(16, true);
} else if (valueCount <= Integer.MAX_VALUE) {
} else if (valueCount <= Integer.MAX_VALUE) { //this comparison to Integer.MAX_VALUE will always evaluate to true
return new ArrowType.Int(32, true);
} else {
return new ArrowType.Int(64, true);
Expand Down