Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore private and package-private classes when importing custom components #702

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Gluon and/or its affiliates.
* Copyright (c) 2020, 2024, Gluon and/or its affiliates.
* Copyright (c) 2012, 2014, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
Expand Down Expand Up @@ -102,8 +102,10 @@ JarReportEntry exploreEntry(String entryName, ClassLoader classLoader, String cl
// http://stackoverflow.com/questions/8100376/class-forname-vs-classloader-loadclass-which-to-use-for-dynamic-loading
entryClass = classLoader.loadClass(className); // Note: static intializers of entryClass are not run, this doesn't seem to be an issue

if (Modifier.isAbstract(entryClass.getModifiers())
|| !Node.class.isAssignableFrom(entryClass)) {
final int modifiers = entryClass.getModifiers();
if (Modifier.isAbstract(modifiers)
|| !Node.class.isAssignableFrom(entryClass)
|| !(Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers))) {
status = JarReportEntry.Status.IGNORED;
entryClass = null;
entryException = null;
Expand Down
Loading