[GRADLE-2387] java.lang.ArrayIndexOutOfBoundsException in compile task with Java8 Created: 13/Jul/12  Updated: 04/Jan/13  Resolved: 06/Aug/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0
Fix Version/s: 1.2-rc-1

Type: Bug
Reporter: Mikko Tiihonen Assignee: Unassigned
Resolution: Fixed Votes: 1

Attachments: File gradle-java8.patch    


You can get Java8 from here: http://jdk8.java.net/download.html

The code should preferably be modified to support Java8 (prereleases) plus be fixed to throw the intended IllegalArgumentException when unknown version is seen.

Caused by: java.lang.ArrayIndexOutOfBoundsException: 7
at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:60)
at org.gradle.api.JavaVersion.current(JavaVersion.java:71)
at org.gradle.api.internal.tasks.compile.JavaCompilerArgumentsBuilder.addMainOptions(JavaCompilerArgumentsBuilder.java:87)
at org.gradle.api.internal.tasks.compile.JavaCompilerArgumentsBuilder.build(JavaCompilerArgumentsBuilder.java:62)

Comment by Mikko Tiihonen [ 13/Jul/12 ]

Here is a patch to add java8 support and to fix array index out of bounds when newer than supported java is seen.

Comment by Paul Merlin [ 31/Jul/12 ]

We see the very same issue on Qi4j build.

Generated at Wed Jun 30 12:20:31 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.