3434import java .net .URL ;
3535import java .net .URLConnection ;
3636import java .nio .charset .StandardCharsets ;
37- import java .util .Arrays ;
3837import java .util .Collection ;
3938import java .util .Collections ;
4039import java .util .Enumeration ;
@@ -385,8 +384,6 @@ private Collection<Processor> lookupProcessors(ClassLoader cl, boolean onScan, b
385384 if (instance instanceof Processor ) {
386385 result .add (new ErrorToleratingProcessor ((Processor ) instance ));
387386 }
388- } catch (ThreadDeath td ) {
389- throw td ;
390387 } catch (Throwable t ) {
391388 LOG .log (Level .FINE , null , t );
392389 }
@@ -734,7 +731,17 @@ private static boolean hasSourceCache(@NonNull final URL root) {
734731
735732 //keep synchronized with libs.javacapi/manifest.mf and libs.javacimpl/manifest.mf
736733 //when adding new packages, double-check the quick path in loadClass below:
737- private static final Iterable <? extends String > javacPackages = Arrays .asList ("com.sun.javadoc." , "com.sun.source." , "javax.annotation.processing." , "javax.lang.model." , "javax.tools." , "com.sun.tools.javac." , "com.sun.tools.javadoc." , "com.sun.tools.classfile." , "com.sun.tools.hc." );
734+ private static final List <String > javacPackages = List .of (
735+ "javax.annotation.processing." ,
736+ "javax.lang.model." ,
737+ "javax.tools." ,
738+ "com.sun.source." ,
739+ "com.sun.tools.classfile." ,
740+ "com.sun.tools.javac." ,
741+ "com.sun.tools.doclint." ,
742+ "com.sun.tools.javap."
743+ );
744+
738745 private static final class BypassOpenIDEUtilClassLoader extends ClassLoader {
739746 private final ClassLoader contextCL ;
740747 public BypassOpenIDEUtilClassLoader (ClassLoader contextCL ) {
@@ -993,7 +1000,7 @@ public SourceVersion getSupportedSourceVersion() {
9931000 public void init (ProcessingEnvironment processingEnv ) {
9941001 try {
9951002 delegate .init (processingEnv );
996- } catch (ClientCodeException | ThreadDeath | Abort err ) {
1003+ } catch (ClientCodeException | Abort err ) {
9971004 initFailed = true ;
9981005 throw err ;
9991006 } catch (Throwable t ) {
@@ -1016,7 +1023,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
10161023 }
10171024 try {
10181025 return delegate .process (annotations , roundEnv );
1019- } catch (ClientCodeException | ThreadDeath | Abort err ) {
1026+ } catch (ClientCodeException | Abort err ) {
10201027 processFailed = true ;
10211028 throw err ;
10221029 } catch (Throwable t ) {
0 commit comments