PMD: Enable and obey UnnecessaryParentheses
This works on statements, not expressions, so it's a lot easier and saner to obey than UselessParentheses.
This commit is contained in:
parent
e5bc365b64
commit
ac8d3ff600
@ -219,7 +219,7 @@ public class WifiStateChangeService extends Service {
|
||||
if (inetAddress.equals(address.getAddress()) && !TextUtils.isEmpty(FDroidApp.ipAddressString)) {
|
||||
String cidr = String.format(Locale.ENGLISH, "%s/%d",
|
||||
FDroidApp.ipAddressString, address.getNetworkPrefixLength());
|
||||
FDroidApp.subnetInfo = (new SubnetUtils(cidr)).getInfo();
|
||||
FDroidApp.subnetInfo = new SubnetUtils(cidr).getInfo();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
<rule ref="rulesets/java/optimizations.xml/UseArraysAsList"/>
|
||||
|
||||
<rule ref="rulesets/java/controversial.xml/UnnecessaryConstructor"/>
|
||||
<rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/>
|
||||
|
||||
<rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException"/>
|
||||
<rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user