Simplify single assignment and avoid redundant if conditions.master
@@ -638,10 +638,7 @@ public class Tar extends MatchingTask { | |||||
* @since Ant 1.7 | * @since Ant 1.7 | ||||
*/ | */ | ||||
protected boolean check(final File basedir, final String[] files) { | protected boolean check(final File basedir, final String[] files) { | ||||
boolean upToDate = true; | |||||
if (!archiveIsUpToDate(files, basedir)) { | |||||
upToDate = false; | |||||
} | |||||
boolean upToDate = archiveIsUpToDate(files, basedir); | |||||
for (String file : files) { | for (String file : files) { | ||||
if (tarFile.equals(new File(basedir, file))) { | if (tarFile.equals(new File(basedir, file))) { | ||||
@@ -404,17 +404,14 @@ public class XmlProperty extends Task { | |||||
} | } | ||||
String nodeText = null; | String nodeText = null; | ||||
boolean emptyNode = false; | boolean emptyNode = false; | ||||
boolean semanticEmptyOverride = false; | |||||
if (node.getNodeType() == Node.ELEMENT_NODE | |||||
boolean semanticEmptyOverride = node.getNodeType() == Node.ELEMENT_NODE | |||||
&& semanticAttributes | && semanticAttributes | ||||
&& node.hasAttributes() | && node.hasAttributes() | ||||
&& (node.getAttributes().getNamedItem(VALUE) != null | && (node.getAttributes().getNamedItem(VALUE) != null | ||||
|| node.getAttributes().getNamedItem(LOCATION) != null | || node.getAttributes().getNamedItem(LOCATION) != null | ||||
|| node.getAttributes().getNamedItem(REF_ID) != null | || node.getAttributes().getNamedItem(REF_ID) != null | ||||
|| node.getAttributes().getNamedItem(PATH) != null || node.getAttributes() | || node.getAttributes().getNamedItem(PATH) != null || node.getAttributes() | ||||
.getNamedItem(PATHID) != null)) { | |||||
semanticEmptyOverride = true; | |||||
} | |||||
.getNamedItem(PATHID) != null); | |||||
if (node.getNodeType() == Node.TEXT_NODE) { | if (node.getNodeType() == Node.TEXT_NODE) { | ||||
// For the text node, add a property. | // For the text node, add a property. | ||||
nodeText = getAttributeValue(node); | nodeText = getAttributeValue(node); | ||||
@@ -207,10 +207,7 @@ public class Permissions { | |||||
public void checkPermission(final java.security.Permission perm) { | public void checkPermission(final java.security.Permission perm) { | ||||
if (active) { | if (active) { | ||||
if (delegateToOldSM && !perm.getName().equals("exitVM")) { | if (delegateToOldSM && !perm.getName().equals("exitVM")) { | ||||
boolean permOK = false; | |||||
if (granted.implies(perm)) { | |||||
permOK = true; | |||||
} | |||||
boolean permOK = granted.implies(perm); | |||||
checkRevoked(perm); | checkRevoked(perm); | ||||
/* | /* | ||||
if the permission was not explicitly granted or revoked | if the permission was not explicitly granted or revoked | ||||