From b5bf8415e8bbc78627a50eb224b21b2a3aeb3b4b Mon Sep 17 00:00:00 2001
From: Florian McKee <84742327+fmck3516@users.noreply.github.com>
Date: Sun, 26 Nov 2023 09:54:38 -0600
Subject: [PATCH] make access modifier as restrictive as possible
---
skippy-core/src/main/java/io/skippy/core/AnalyzedFile.java | 2 +-
.../main/java/io/skippy/core/FullyQualifiedClassName.java | 2 +-
.../src/main/java/io/skippy/core/SkippyConstants.java | 6 +++---
.../src/main/java/io/skippy/core/TestImpactAnalysis.java | 7 ++-----
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/skippy-core/src/main/java/io/skippy/core/AnalyzedFile.java b/skippy-core/src/main/java/io/skippy/core/AnalyzedFile.java
index 1b07472..2ff5dd5 100644
--- a/skippy-core/src/main/java/io/skippy/core/AnalyzedFile.java
+++ b/skippy-core/src/main/java/io/skippy/core/AnalyzedFile.java
@@ -23,7 +23,7 @@
*
MD5 hash of class file
*
*/
-public class AnalyzedFile {
+class AnalyzedFile {
private static final Logger LOGGER = LogManager.getLogger(AnalyzedFile.class);
diff --git a/skippy-core/src/main/java/io/skippy/core/FullyQualifiedClassName.java b/skippy-core/src/main/java/io/skippy/core/FullyQualifiedClassName.java
index 2f74ff0..1ad2baa 100644
--- a/skippy-core/src/main/java/io/skippy/core/FullyQualifiedClassName.java
+++ b/skippy-core/src/main/java/io/skippy/core/FullyQualifiedClassName.java
@@ -4,4 +4,4 @@
* Allows for more meaningful typing, e.g., {@code Map>}
* instead of {@code Map>}.
*/
-public record FullyQualifiedClassName(String fullyQualifiedClassName) {}
\ No newline at end of file
+record FullyQualifiedClassName(String fullyQualifiedClassName) {}
\ No newline at end of file
diff --git a/skippy-core/src/main/java/io/skippy/core/SkippyConstants.java b/skippy-core/src/main/java/io/skippy/core/SkippyConstants.java
index 03f577d..e137d24 100644
--- a/skippy-core/src/main/java/io/skippy/core/SkippyConstants.java
+++ b/skippy-core/src/main/java/io/skippy/core/SkippyConstants.java
@@ -5,16 +5,16 @@
/**
* Comment to make the JavaDoc task happy.
*/
-public class SkippyConstants {
+class SkippyConstants {
/**
* The directory that contains the Skippy analysis.
*/
- public static final Path SKIPPY_DIRECTORY = Path.of("skippy");
+ static final Path SKIPPY_DIRECTORY = Path.of("skippy");
/**
* The file that contains data for all {@link AnalyzedFile}s.
*/
- public static final Path SKIPPY_ANALYSIS_FILE = Path.of("analyzedFiles.txt");
+ static final Path SKIPPY_ANALYSIS_FILE = Path.of("analyzedFiles.txt");
}
\ No newline at end of file
diff --git a/skippy-core/src/main/java/io/skippy/core/TestImpactAnalysis.java b/skippy-core/src/main/java/io/skippy/core/TestImpactAnalysis.java
index 019c95d..ed09754 100644
--- a/skippy-core/src/main/java/io/skippy/core/TestImpactAnalysis.java
+++ b/skippy-core/src/main/java/io/skippy/core/TestImpactAnalysis.java
@@ -18,14 +18,11 @@
/**
* A mapping between tests and the classes they cover.
*/
-public class TestImpactAnalysis {
+class TestImpactAnalysis {
private static final Logger LOGGER = LogManager.getLogger(TestImpactAnalysis.class);
- /**
- * Indicates that no test impact analysis was found.
- */
- public static final TestImpactAnalysis UNAVAILABLE = new TestImpactAnalysis(emptyMap());
+ static final TestImpactAnalysis UNAVAILABLE = new TestImpactAnalysis(emptyMap());
private final Map> testCoverage;