Skip to content

Commit

Permalink
correct updatedAddedTargetFilesForPotentialEnum return value
Browse files Browse the repository at this point in the history
  • Loading branch information
gmerr3 committed Nov 6, 2024
1 parent 3ec9d29 commit 8689f0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ private static void performMinimizationImpl(
Map<String, String> nonPrimaryClassesToPrimaryClass = new HashMap<>();
SourceRoot sourceRoot = new SourceRoot(Path.of(root));
sourceRoot.tryToParse();
//getCompilationUnits does not seem to include all files, causing some to be deleted
// getCompilationUnits does not seem to include all files, causing some to be deleted
for (ParseResult<CompilationUnit> res : sourceRoot.getCache()) {
CompilationUnit compilationUnit =
res.getResult().orElseThrow(() -> new RuntimeException("" + res.getProblems()));
res.getResult().orElseThrow(() -> new RuntimeException(res.getProblems().toString()));
Path pathOfCurrentJavaFile =
compilationUnit.getStorage().get().getPath().toAbsolutePath().normalize();
String primaryTypeQualifiedName = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ public boolean updatedAddedTargetFilesForPotentialEnum(FieldAccessExpr expr) {
}
if (resolved.isEnumConstant()) {
if (JavaLangUtils.inJdkPackage(resolved.getType().describe())) {
return true;
return false;
}
String filePathName = qualifiedNameToFilePath(resolved.getType().describe());
if (!addedTargetFiles.contains(filePathName)) {
Expand Down

0 comments on commit 8689f0f

Please sign in to comment.