> Hi folks, 
> 
> This PR aims to fix 
> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). 
> 
> I think the regression got introduced in 
> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). 
> 
> In the issue linked above, 
> [LauncherHelper#getMainType](https://github.com/openjdk/jdk/pull/16461/files#diff-108a3a3e3c2d108c8c7f19ea498f641413b7c9239ecd2975a6c27d904c2ba226)
>  got removed to simplify launcher code.
> 
> Previously, we used ```getMainType``` to do the appropriate main method 
> invocation in ```JavaMain```. However, we currently attempt to do all types 
> of main method invocations at the same time 
> [here](https://github.com/openjdk/jdk/blob/master/src/java.base/share/native/libjli/java.c#L623).
>  
> 
> Note how all of these invocations clear the exception reported with 
> [CHECK_EXCEPTION_FAIL](https://github.com/openjdk/jdk/blob/140f56718bbbfc31bb0c39255c68568fad285a1f/src/java.base/share/native/libjli/java.c#L390).
>  
> 
> Therefore, if a legitimate exception comes up during one of these 
> invocations, it does not get reported. 
> 
> I propose reintroducing ```LauncherHelper#getMainType``` but I'm looking 
> forward to your suggestions. 
> 
> Cheers, 
> Sonia

Sonia Zaldana Calles has updated the pull request with a new target base due to 
a merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains 14 additional commits 
since the last revision:

 - Merge branch 'openjdk:master' into JDK-8329581
 - Decreasing diff size addressing unnecessary changes
 - Fixing indentation
   
   Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com>
 - Fixing broken uncaught exception mechanism
 - Make deleting file OS agnostic
 - Adding test case
 - Removing long lines
 - Using new macro to avoid reporting JNI error
 - Changes based on feedback
 - Fixing space formatting
 - ... and 4 more: https://git.openjdk.org/jdk/compare/d654de0c...12fe416c

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/18786/files
  - new: https://git.openjdk.org/jdk/pull/18786/files/1a0c76f2..12fe416c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18786&range=10
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18786&range=09-10

  Stats: 582850 lines in 7246 files changed: 146903 ins; 86361 del; 349586 mod
  Patch: https://git.openjdk.org/jdk/pull/18786.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18786/head:pull/18786

PR: https://git.openjdk.org/jdk/pull/18786

Reply via email to