Skip to content

Commit b488e51

Browse files
committed
Minor code cleanup
Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
1 parent 3062147 commit b488e51

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/org/spdx/utility/compare/FilterTemplateOutputHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void text(String text) {
8585
currentString.append(text);
8686
} else if (OptionalTextHandling.REGEX_USING_TOKENS.equals(optionalTextHandling)) {
8787
optionalTokens.get(optionalDepth).addAll(Arrays.asList(
88-
LicenseCompareHelper.tokenizeLicenseText(text, new HashMap<Integer, LineColumn>())));
88+
LicenseCompareHelper.tokenizeLicenseText(text, new HashMap<>())));
8989
}
9090
}
9191

@@ -140,12 +140,11 @@ public void beginOptional(LicenseTemplateRule rule) {
140140
}
141141

142142
/**
143-
* @param tokens list of tokens
144143
* @return regular expression with quoted tokens
145144
*/
146145
private String toTokenRegex(List<String> tokens) {
147146
StringBuilder sb = new StringBuilder();
148-
for (String token:optionalTokens.get(optionalDepth)) {
147+
for (String token:tokens) {
149148
token = token.trim();
150149
if (LicenseCompareHelper.NORMALIZE_TOKENS.containsKey(token.toLowerCase())) {
151150
token = LicenseCompareHelper.NORMALIZE_TOKENS.get(token.toLowerCase());

0 commit comments

Comments
 (0)