Skip to content

Commit

Permalink
8332740: [BACKOUT] JDK-8331081 'internal proprietary API' diagnostics…
Browse files Browse the repository at this point in the history
… if --system is configured to an earlier JDK version

Reviewed-by: mikael, prr, jlahoda
  • Loading branch information
Daniel D. Daugherty committed May 22, 2024
1 parent 37c4778 commit b4d1454
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ protected ClassFinder(Context context) {
* available from the module system.
*/
long getSupplementaryFlags(ClassSymbol c) {
if (c.name == names.module_info) {
if (jrtIndex == null || !jrtIndex.isInJRT(c.classfile) || c.name == names.module_info) {
return 0;
}

Expand All @@ -257,22 +257,17 @@ long getSupplementaryFlags(ClassSymbol c) {
try {
ModuleSymbol owningModule = packge.modle;
if (owningModule == syms.noModule) {
if (jrtIndex != null && jrtIndex.isInJRT(c.classfile)) {
JRTIndex.CtSym ctSym = jrtIndex.getCtSym(packge.flatName());
Profile minProfile = Profile.DEFAULT;
if (ctSym.proprietary)
newFlags |= PROPRIETARY;
if (ctSym.minProfile != null)
minProfile = Profile.lookup(ctSym.minProfile);
if (profile != Profile.DEFAULT && minProfile.value > profile.value) {
newFlags |= NOT_IN_PROFILE;
}
JRTIndex.CtSym ctSym = jrtIndex.getCtSym(packge.flatName());
Profile minProfile = Profile.DEFAULT;
if (ctSym.proprietary)
newFlags |= PROPRIETARY;
if (ctSym.minProfile != null)
minProfile = Profile.lookup(ctSym.minProfile);
if (profile != Profile.DEFAULT && minProfile.value > profile.value) {
newFlags |= NOT_IN_PROFILE;
}
} else if (owningModule.name == names.jdk_unsupported) {
newFlags |= PROPRIETARY;
} else {
// don't accumulate user modules in supplementaryFlags
return 0;
}
} catch (IOException ignore) {
}
Expand Down
127 changes: 0 additions & 127 deletions test/langtools/tools/javac/options/system/SystemSunProprietary.java

This file was deleted.

1 comment on commit b4d1454

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.