-
Notifications
You must be signed in to change notification settings - Fork 1
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
W-17457827: JPMS support for the RevAPI plugin. #172
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general.
Set<ExportedPackages> exportedPackages = new HashSet<>(); | ||
api.getArchives().forEach(archive -> { | ||
if (!addJavaModuleSystemExportedPackages(api, archive, exportedPackages)) { | ||
if (!addMuleModuleSystemExportedPackages(archive, exportedPackages)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use && instead of nested ifs
} | ||
|
||
private boolean addMuleModuleSystemExportedPackages(Archive archive, Set<ExportedPackages> exportedPackages) { | ||
if (isMixedMode() || isMuleMode()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't isMuleMode
checked for mixed mode as well?
} | ||
|
||
private boolean addJavaModuleSystemExportedPackages(API api, Archive archive, Set<ExportedPackages> exportedPackages) { | ||
if (isJavaMode() || isMixedMode()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't isJavaMode checked for mixed mode as well?
|
||
boolean isExported(String packageName); | ||
|
||
void logExportedPackages(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is weird... by the name this seems to be a value object... why does it have logging behaviour?
|
||
public interface ExportedPackages { | ||
|
||
boolean isExported(String packageName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add javadocs
if (moduleReferences.isEmpty()) { | ||
return empty(); | ||
} else { | ||
return Optional.of(moduleReferences.iterator().next()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static import
Field archiveFile = archive.getClass().getDeclaredField("file"); | ||
archiveFile.setAccessible(true); | ||
return ((File) archiveFile.get(archive)).toPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
archive.getName()
?
No description provided.