Fix critical typo in ZoneVerifier; more sonarlint
This commit is contained in:
parent
69a0a34239
commit
3601676406
@ -47,8 +47,8 @@
|
||||
deprecation="true"
|
||||
includeantruntime="false"
|
||||
includes="com/verisignlabs/dnssec/"
|
||||
source="8"
|
||||
target="8" />
|
||||
source="11"
|
||||
target="11" />
|
||||
</target>
|
||||
|
||||
<target name="sectools-jar" depends="usage,sectools">
|
||||
|
@ -22,7 +22,6 @@ import java.io.FileFilter;
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
|
@ -21,7 +21,6 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
|
@ -24,7 +24,6 @@ import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
@ -455,9 +455,7 @@ public class DnsKeyAlgorithm {
|
||||
* alias.
|
||||
*/
|
||||
public boolean supportedAlgorithm(int algorithm) {
|
||||
if (mAlgorithmMap.containsKey(algorithm))
|
||||
return true;
|
||||
return false;
|
||||
return mAlgorithmMap.containsKey(algorithm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,7 +262,7 @@ public class DnsSecVerifier {
|
||||
* @return true if the set verified, false if it did not.
|
||||
*/
|
||||
public boolean verify(RRset rrset) {
|
||||
boolean result = mVerifyAllSigs ? true : false;
|
||||
boolean result = mVerifyAllSigs;
|
||||
|
||||
if (rrset.sigs().isEmpty()) {
|
||||
log.fine("RRset failed to verify due to lack of signatures");
|
||||
|
@ -84,6 +84,14 @@ public class ZoneVerifier {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean mIsMarked = false;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return super.equals(o);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
boolean getMark() {
|
||||
return mIsMarked;
|
||||
}
|
||||
@ -161,7 +169,7 @@ public class ZoneVerifier {
|
||||
if (mNSEC3Map == null) {
|
||||
mNSEC3Map = new TreeMap<>();
|
||||
}
|
||||
MarkRRset rrset = mNSECMap.computeIfAbsent(n, k -> new MarkRRset());
|
||||
MarkRRset rrset = mNSEC3Map.computeIfAbsent(n, k -> new MarkRRset());
|
||||
|
||||
return addRRtoRRset(rrset, r);
|
||||
}
|
||||
@ -326,6 +334,8 @@ public class ZoneVerifier {
|
||||
}
|
||||
|
||||
switch (mDNSSECType) {
|
||||
case UNSIGNED:
|
||||
throw new IllegalArgumentException("Cannot process Unsigned zone");
|
||||
case NSEC:
|
||||
// all nodes with NSEC records have NSEC and RRSIG types
|
||||
typeset.add(Type.NSEC);
|
||||
|
Loading…
Reference in New Issue
Block a user