Skip to content

Commit 4b50c09

Browse files
committed
Fixed a bug with loading a dictionary for path segment identification
1 parent f0f0af3 commit 4b50c09

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id "com.adarshr.test-logger" version "4.0.0"
66
}
77

8-
version = "2.1.0"
8+
version = "2.1.1"
99
group = "rest-ruler"
1010

1111
repositories {

src/main/java/cli/rule/Utility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static boolean getPathSegmentContained(String word, String filePath) {
5555

5656
public static boolean getPathSegmentMatch(String word, String filePath) {
5757
boolean isWordInDictionary = false;
58-
try (Scanner scanner = new Scanner(new File(filePath))) {
58+
try (Scanner scanner = new Scanner(Utility.class.getResourceAsStream(filePath))) {
5959
if (scanner.useDelimiter("\\Z").next().matches(word))
6060
isWordInDictionary = true;
6161
} catch (Exception e) {

0 commit comments

Comments
 (0)