From 8689f0f14520ab179d7a6df62119ca03d5952537 Mon Sep 17 00:00:00 2001 From: gmerr3 <127778000+gmerr3@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:49:48 -0500 Subject: [PATCH] correct updatedAddedTargetFilesForPotentialEnum return value --- .../java/org/checkerframework/specimin/SpeciminRunner.java | 4 ++-- .../org/checkerframework/specimin/UnsolvedSymbolVisitor.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/checkerframework/specimin/SpeciminRunner.java b/src/main/java/org/checkerframework/specimin/SpeciminRunner.java index 1e59bde6..df3072a9 100644 --- a/src/main/java/org/checkerframework/specimin/SpeciminRunner.java +++ b/src/main/java/org/checkerframework/specimin/SpeciminRunner.java @@ -237,10 +237,10 @@ private static void performMinimizationImpl( Map 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 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 = ""; diff --git a/src/main/java/org/checkerframework/specimin/UnsolvedSymbolVisitor.java b/src/main/java/org/checkerframework/specimin/UnsolvedSymbolVisitor.java index 2c736588..6b974f20 100644 --- a/src/main/java/org/checkerframework/specimin/UnsolvedSymbolVisitor.java +++ b/src/main/java/org/checkerframework/specimin/UnsolvedSymbolVisitor.java @@ -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)) {