Skip to content

Commit 8449748

Browse files
committed
fix(codacy): resolve excessive parameter and redundant import warnings
1 parent bbf6ec6 commit 8449748

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

java-diff-utils/src/main/java/com/github/difflib/DiffUtils.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.github.difflib.algorithm.DiffAlgorithmI;
2020
import com.github.difflib.algorithm.DiffAlgorithmListener;
2121
import com.github.difflib.patch.Patch;
22+
import com.github.difflib.patch.PatchFailedException;
2223
import java.util.Arrays;
2324
import java.util.List;
2425
import java.util.Objects;
@@ -162,7 +163,6 @@ public static <T> Patch<T> diff(
162163
return diff(original, revised, algorithm, null);
163164
}
164165

165-
166166
/**
167167
* Computes the difference between the given texts inline. Splits the texts
168168
* into tokens and delegates to the default diff algorithm.
@@ -182,10 +182,9 @@ public static Patch<String> diffInline(String original, String revised) {
182182
* @param original the original list. Must not be {@code null}.
183183
* @param patch the patch to apply. Must not be {@code null}.
184184
* @return the revised list.
185-
* @throws com.github.difflib.patch.PatchFailedException if the patch cannot be applied.
185+
* @throws PatchFailedException if the patch cannot be applied.
186186
*/
187-
public static <T> List<T> patch(List<? extends T> original, Patch<T> patch)
188-
throws com.github.difflib.patch.PatchFailedException {
187+
public static <T> List<T> patch(List<? extends T> original, Patch<T> patch) throws PatchFailedException {
189188
return PatchUtils.patch(original, patch);
190189
}
191190

java-diff-utils/src/main/java/com/github/difflib/text/InlineDiffAnnotatorConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ final class InlineDiffAnnotatorConfig {
2929
final boolean replaceOriginalLinefeedInChangesWithSpaces;
3030
final int columnWidth;
3131

32+
@SuppressWarnings({"squid:S107", "PMD.ExcessiveParameterList"})
3233
InlineDiffAnnotatorConfig(
3334
boolean reportLinesUnchanged,
3435
Function<String, String> lineNormalizer,

0 commit comments

Comments
 (0)