Skip to content

Commit

Permalink
Fixed sonarcloud issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoOfTwelve committed Oct 10, 2023
1 parent 5407b18 commit f6a07ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ private TestDirectoryConstants() {
}

/**
* Base path to the saved results
* Base path to the resources directory
*/
public static final Path BASE_PATH_TO_RESULT_JSON = Path.of("src", "test", "resources", "results");
public static final Path BASE_PATH_TO_RESOURCES = Path.of("src", "test", "resources");

/**
* Base path to the data set descriptors
* Base path to the saved results
*/
public static final Path BASE_PATH_TO_DATA_SET_DESCRIPTORS = Path.of("src", "test", "resources", "dataSets");
public static final Path BASE_PATH_TO_RESULT_JSON = BASE_PATH_TO_RESOURCES.resolve(Path.of("results"));

/**
* Base path to the resources directory
* Base path to the data set descriptors
*/
public static final Path BASE_PATH_TO_RESOURCES = Path.of("src", "test", "resources");
public static final Path BASE_PATH_TO_DATA_SET_DESCRIPTORS = BASE_PATH_TO_RESOURCES.resolve(Path.of("dataSets"));
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package de.jplag.endtoend.model;

import java.util.Arrays;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
Expand Down Expand Up @@ -27,4 +30,26 @@ public int[] getMinimumTokenMatches() {

return values;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Options options = (Options) o;
return Arrays.equals(minimumTokenMatches, options.minimumTokenMatches) && Objects.equals(baseCodeDirectory, options.baseCodeDirectory);
}

@Override
public int hashCode() {
int result = Objects.hash(baseCodeDirectory);
result = 31 * result + Arrays.hashCode(minimumTokenMatches);
return result;
}

@Override
public String toString() {
return "Options{" + "minimumTokenMatches=" + Arrays.toString(minimumTokenMatches) + ", baseCodeDirectory='" + baseCodeDirectory + '\'' + '}';
}
}

0 comments on commit f6a07ba

Please sign in to comment.