未验证 提交 fe1fc38b 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #4163 from Egor18/removeUselessConditions

Remove useless conditions
......@@ -1114,7 +1114,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
try(final JarFile jarFile = jarURLConnection.getJarFile()) {
final JarEntry entry = (entryName != null && jarFile != null) ? jarFile.getJarEntry(entryName) : null;
if (entry != null && jarFile != null) {
if (entry != null) {
try(InputStream i = jarFile.getInputStream(entry)) {
byte[] manifestBytes = IOUtils.toByteArray(i);
in = new ByteArrayInputStream(manifestBytes);
......
......@@ -132,7 +132,7 @@ public class StringParameterDefinition extends SimpleParameterDefinition {
public ParameterValue createValue(String str) {
StringParameterValue value = new StringParameterValue(getName(), str, getDescription());
if (isTrim() && value!=null) {
if (isTrim()) {
value.doTrim();
}
return value;
......
......@@ -353,7 +353,13 @@ public class ArgumentListBuilder implements Serializable, Cloneable {
percent = (c == '%');
if (quoted) quotedArgs.append(c);
}
if(i == 0 && quoted) quotedArgs.insert(0, '"'); else if (i == 0 && !quoted) quotedArgs.append('"');
if (i == 0) {
if (quoted) {
quotedArgs.insert(0, '"');
} else {
quotedArgs.append('"');
}
}
if (quoted) quotedArgs.append('"'); else quotedArgs.append(arg);
windowsCommand.add(quotedArgs, mask.get(i));
......
......@@ -197,7 +197,7 @@ public class SecretRewriter {
}
private static boolean isBase64(char ch) {
return 0<=ch && ch<128 && IS_BASE64[ch];
return ch<128 && IS_BASE64[ch];
}
private static boolean isBase64(String s) {
......
......@@ -210,7 +210,7 @@ public class HistoryPageFilter<T> {
}
}
}
} else if (olderThan != null) {
} else {
Iterator<ItemT> iter = items.iterator();
while (iter.hasNext()) {
Object item = iter.next();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册