Skip to content

Commit

Permalink
log ignore uber jars config
Browse files Browse the repository at this point in the history
  • Loading branch information
Cornul11 committed Mar 1, 2024
1 parent cab741b commit 2b3d526
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void run() {
switch (mode) {
case "CORPUS_GEN_MODE":
JarFileExplorer jarFileExplorer = new JarFileExplorer(signatureDao, config);
logger.info("Starting CORPUS_GEN_MODE; ignoring uber JARs: " + config.getIgnoreUberJarSignatures());
String directoryPath = options.getDirectory();
String filePaths = options.getFilePaths();
if (directoryPath != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public JarHandler(Path jarFilePath, ConcurrentLinkedDeque<String> ignoredUberJar
this.jarFilePath = jarFilePath;
this.ignoredUberJars = ignoredUberJars;
this.insertedLibraries = insertedLibraries;
this.ignoreUberJarSignatures = config.ignoreUberJarSignatures();
this.ignoreUberJarSignatures = config.getIgnoreUberJarSignatures();
this.crcValue = this.generateCrc();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void loadConfig() {
loadConfig(CONFIG_FILE_NAME);
}

public boolean ignoreUberJarSignatures() {
public boolean getIgnoreUberJarSignatures() {
return Boolean.parseBoolean(config.getProperty("ignoreUberJarSignatures"));
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/BytecodeDetailsUberJarDetectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class BytecodeDetailsUberJarDetectionTest {
public void setUp() {
MockitoAnnotations.openMocks(this);

Mockito.when(config.ignoreUberJarSignatures()).thenReturn(true);
Mockito.when(config.getIgnoreUberJarSignatures()).thenReturn(true);
fileAnalyzer = new FileAnalyzer(signatureDao, config);
}

Expand Down

0 comments on commit 2b3d526

Please sign in to comment.