Skip to content

Commit

Permalink
rename utilities method
Browse files Browse the repository at this point in the history
  • Loading branch information
dehall committed Dec 19, 2023
1 parent cf1bffd commit 649eb82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public static void main(String[] args) throws Exception {
} else {
// look inside the src/main/resources/keep_modules folder
URI keepModulesURI = App.class.getClassLoader().getResource("keep_modules").toURI();
Utilities.fixPathFromJar(keepModulesURI);
Utilities.enableReadingURIFromJar(keepModulesURI);
Path possibleLocation = Paths.get(keepModulesURI).resolve(value);

Check warning on line 210 in src/main/java/App.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/App.java#L208-L210

Added lines #L208 - L210 were not covered by tests
if (Files.exists(possibleLocation)) {
options.keepPatientsModulePath = possibleLocation;

Check warning on line 212 in src/main/java/App.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/App.java#L212

Added line #L212 was not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mitre/synthea/engine/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private static Map<String, ModuleSupplier> loadModules() {
*/
public static Path getModulesPath() throws URISyntaxException, IOException {
URI modulesURI = Module.class.getClassLoader().getResource("modules").toURI();
Utilities.fixPathFromJar(modulesURI);
Utilities.enableReadingURIFromJar(modulesURI);
return Paths.get(modulesURI);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mitre/synthea/helpers/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public static Map cleanMap(Map input) {
* path refers to an internal location.
* @param uri URI to be accessed
*/
public static void fixPathFromJar(URI uri) throws IOException {
public static void enableReadingURIFromJar(URI uri) throws IOException {
// this function is a hack to enable reading modules from within a JAR file
// see https://stackoverflow.com/a/48298758
if ("jar".equals(uri.getScheme())) {
Expand Down

0 comments on commit 649eb82

Please sign in to comment.