Skip to content

Commit

Permalink
fixes #24 regarding NullPointerException inside workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
FibreFoX committed Jul 29, 2016
1 parent ffd12ee commit 2543f57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ apply plugin: 'signing'
apply plugin: 'checkstyle'

repositories {
mavenLocal()
mavenCentral()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,13 @@ public FileVisitResult postVisitDirectory(Path source, IOException ioe) throws I
if( "linux.app".equals(b.getID()) ){
logger.info("Applying workaround for oracle-jdk-bug since 1.8.0u40 regarding native linux launcher(s).");
if( !ext.isSkipNativeLauncherWorkaround124() ){
List<NativeLauncher> nativeLaunchers = ext.getSecondaryLaunchers().stream().map(launcherMap -> getNativeLauncher(launcherMap)).collect(Collectors.toList());
List<NativeLauncher> nativeLaunchers = new ArrayList<>();

// bugfix for #24 "NullPointerException on linux without secondary launchers"
Optional.ofNullable(ext.getSecondaryLaunchers()).ifPresent(launchers -> {
nativeLaunchers.addAll(launchers.stream().map(launcherMap -> getNativeLauncher(launcherMap)).collect(Collectors.toList()));
});

workarounds.applyWorkaround124(appName, nativeLaunchers);
// only apply workaround for issue 205 when having workaround for issue 124 active
if( Boolean.parseBoolean(String.valueOf(params.get(cfgWorkaround205Marker))) && !Boolean.parseBoolean((String) params.get(cfgWorkaround205DoneMarker)) ){
Expand Down

0 comments on commit 2543f57

Please sign in to comment.