-
Bug
-
Resolution: Fixed
-
Minor
-
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-20190420092731.buildslave.jdk8u-src-tar--b03)
OpenJDK GraalVM CE 19.0.0 (build 25.212-b03-jvmci-19-b01, mixed mode)Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-20190420092731.buildslave.jdk8u-src-tar--b03) OpenJDK GraalVM CE 19.0.0 (build 25.212-b03-jvmci-19-b01, mixed mode)
-
git-BuildTools-0e60cdb-105 (#105)
-
Yes
Builder.java throws a NullPointerException trying to copy non-exisitent craftbukkit jar when the --compile NONE flag is set for --rev 1.8 at the end of the build.
Exception in thread "main" java.lang.NullPointerException at org.spigotmc.builder.Builder.copyJar(Builder.java:680) at org.spigotmc.builder.Builder.main(Builder.java:621) at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:40)
To reproduce, use the following steps:
- Create a new test folder and copy BuildTools.jar build 105 into the folder
- Execute the command:
java -jar BuildTools.jar --rev 1.8 --compile NONE
Log file is here: https://paste.md-5.net/emulinejes.sql since attachment is not working (Jira could not attach the file as there was a missing token. Please try attaching the file again.)
Notes:
- Running the following does work:
java jar BuildTools.jar --rev 1.8
- Tested with --rev 1.8.8 and same error.
- Tested with --rev 1.12.2 and same error.
- Tested with --rev 1.13.2 (toolsVersion: 93) and same error.
- Tested with --rev 1.14.4 (toolsVersion: 101) and the error DID NOT occur.
Analysis:
Builder.java:618 does not check on older tool versions if compile is set to NONE.
if ( versionInfo.getToolsVersion() < 101 || ( versionInfo.getToolsVersion() > 104 && compile.contains( Compile.CRAFTBUKKIT ) ) )
should probably be...
if ( versionInfo.getToolsVersion() < 101 && !compile.contains( Compile.NONE) || ( versionInfo.getToolsVersion() > 104 && compile.contains( Compile.CRAFTBUKKIT ) ) )