Fix some warnings from LGTM
@@ -260,7 +260,7 @@ public class GsaApiManager extends BaseApiManager implements WebApiManager {
final String tagName =
name.replaceFirst("^" + gsaMetaPrefix, StringUtil.EMPTY).replaceAll(GSA_META_SUFFIX + "\\z",
StringUtil.EMPTY);
- if (getFields != null && getFields.contains(tagName)) {
+ if (getFields.contains(tagName)) {
buf.append("<MT N=\"");
buf.append(tagName);
buf.append("\" V=\"");
@@ -134,10 +134,7 @@ public class ProtwordsFile extends DictionaryFile<ProtwordsItem> {
}
final String inputStrings = line;
- String input = null;
- if (inputStrings != null) {
- input = unescape(inputStrings);
- }
+ String input = unescape(inputStrings);
if (input.length() > 0) {
id++;
@@ -134,10 +134,7 @@ public class StopwordsFile extends DictionaryFile<StopwordsItem> {
@@ -261,11 +261,13 @@ public class LabelTypeHelper {
return false;
} else {
- final boolean match = !excludedPaths.matcher(path).matches();
- if (!match && logger.isDebugEnabled()) {
- logger.debug("Path " + path + " matched against the excludes paths expression " + includedPaths.toString());
+ if (excludedPaths != null && excludedPaths.matcher(path).matches()) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Path " + path + " matched against the excludes paths expression " + excludedPaths.toString());
+ }
+ return false;
- return match;
+ return true;