@@ -241,7 +241,7 @@ protected ClassFinder(Context context) {
241
241
* available from the module system.
242
242
*/
243
243
long getSupplementaryFlags (ClassSymbol c ) {
244
- if (c .name == names .module_info ) {
244
+ if (jrtIndex == null || ! jrtIndex . isInJRT ( c . classfile ) || c .name == names .module_info ) {
245
245
return 0 ;
246
246
}
247
247
@@ -257,22 +257,17 @@ long getSupplementaryFlags(ClassSymbol c) {
257
257
try {
258
258
ModuleSymbol owningModule = packge .modle ;
259
259
if (owningModule == syms .noModule ) {
260
- if (jrtIndex != null && jrtIndex .isInJRT (c .classfile )) {
261
- JRTIndex .CtSym ctSym = jrtIndex .getCtSym (packge .flatName ());
262
- Profile minProfile = Profile .DEFAULT ;
263
- if (ctSym .proprietary )
264
- newFlags |= PROPRIETARY ;
265
- if (ctSym .minProfile != null )
266
- minProfile = Profile .lookup (ctSym .minProfile );
267
- if (profile != Profile .DEFAULT && minProfile .value > profile .value ) {
268
- newFlags |= NOT_IN_PROFILE ;
269
- }
260
+ JRTIndex .CtSym ctSym = jrtIndex .getCtSym (packge .flatName ());
261
+ Profile minProfile = Profile .DEFAULT ;
262
+ if (ctSym .proprietary )
263
+ newFlags |= PROPRIETARY ;
264
+ if (ctSym .minProfile != null )
265
+ minProfile = Profile .lookup (ctSym .minProfile );
266
+ if (profile != Profile .DEFAULT && minProfile .value > profile .value ) {
267
+ newFlags |= NOT_IN_PROFILE ;
270
268
}
271
269
} else if (owningModule .name == names .jdk_unsupported ) {
272
270
newFlags |= PROPRIETARY ;
273
- } else {
274
- // don't accumulate user modules in supplementaryFlags
275
- return 0 ;
276
271
}
277
272
} catch (IOException ignore ) {
278
273
}
0 commit comments