chore: deps upgrade

chore: PMD 8.0.0 obsolete rules replaced

Signed-off-by: Leo Galambos <lg@hq.egothor.org>
This commit is contained in:
2025-12-24 22:33:00 +01:00
parent 0b4b4de603
commit cb363ba2f4
13 changed files with 22 additions and 21 deletions

View File

@@ -136,7 +136,7 @@
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor"/>
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
<rule ref="category/java/codestyle.xml/UnnecessaryImport"/>
<rule ref="category/java/codestyle.xml/UnnecessaryLocalBeforeReturn"/>
<!-- PMD 8.0.0: obsolete rule ref="category/java/codestyle.xml/UnnecessaryLocalBeforeReturn"/ -->
<rule ref="category/java/codestyle.xml/UnnecessaryModifier"/>
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon"/>
@@ -147,7 +147,6 @@
<rule ref="category/java/codestyle.xml/UseShortArrayInitializer"/>
<rule ref="category/java/codestyle.xml/UseUnderscoresInNumericLiterals"/>
<rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod"/>
<rule ref="category/java/design.xml/AvoidCatchingGenericException"/>
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts"/>
<rule ref="category/java/design.xml/AvoidRethrowingException"/>
<rule ref="category/java/design.xml/AvoidThrowingNewInstanceOfSameException"/>
@@ -231,8 +230,11 @@
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier"/>
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/>
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize"/>
<rule ref="category/java/errorprone.xml/AvoidCatchingNPE"/>
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable"/>
<rule ref="category/java/errorprone.xml/AvoidCatchingGenericException">
<properties>
<property name="typesThatShouldNotBeCaught" value="java.lang.RuntimeException,java.lang.Throwable,java.lang.Error" />
</properties>
</rule>
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
<properties>
@@ -245,7 +247,6 @@
<rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingTypeName"/>
<rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause"/>
<rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition"/>
<rule ref="category/java/errorprone.xml/AvoidLosingExceptionInformation"/>
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/>
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/>
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
@@ -313,7 +314,7 @@
<rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals"/>
<rule ref="category/java/errorprone.xml/UseCorrectExceptionLogging"/>
<rule ref="category/java/errorprone.xml/UseEqualsToCompareStrings"/>
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/>
<rule ref="category/java/errorprone.xml/UselessPureMethodCall" />
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions"/>
<rule ref="category/java/errorprone.xml/UseProperClassLoader"/>
<rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel"/>

View File

@@ -30,9 +30,9 @@ repositories {
dependencies {
constraints {
// Define dependency versions as constraints
implementation 'org.apache.commons:commons-text:1.11.0'
implementation 'commons-cli:commons-cli:1.9.0'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.81'
implementation 'org.apache.commons:commons-text:1.15.0'
implementation 'commons-cli:commons-cli:1.11.0'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.83'
implementation 'org.egothor:conflux:[1.0,2.0)'
implementation 'org.apache.commons:commons-imaging:1.0.0-alpha6'
}
@@ -45,7 +45,7 @@ dependencies {
pmd {
consoleOutput = true
toolVersion = '7.16.0'
toolVersion = '7.19.0'
sourceSets = [sourceSets.main]
ruleSetFiles = files(rootProject.file(".ruleset"))
}

View File

@@ -518,7 +518,7 @@ public final class CryptoAlgorithms {
destroyed = true;
}
}
} catch (Exception ignored) { // NOPMD
} catch (Exception ignored) {
// swallow and report via audit only if destroyed
}
if (destroyed) {

View File

@@ -186,7 +186,7 @@ public final class BikeKemContext implements KemContext {
.createKey(key.getEncoded());
BIKEKEMExtractor ex = new BIKEKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("BIKE decapsulate failed", e);
}
}

View File

@@ -219,7 +219,7 @@ public final class CmceKemContext implements KemContext {
.createKey(key.getEncoded());
CMCEKEMExtractor ex = new CMCEKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("CMCE decapsulate failed", e);
}
}

View File

@@ -212,7 +212,7 @@ public final class FrodoKemContext implements KemContext {
.createKey(key.getEncoded());
FrodoKEMExtractor ex = new FrodoKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("Frodo decapsulate failed", e);
}
}

View File

@@ -213,7 +213,7 @@ public final class HqcKemContext implements KemContext {
.createKey(key.getEncoded());
HQCKEMExtractor ex = new HQCKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("HQC decapsulate failed", e);
}
}

View File

@@ -220,7 +220,7 @@ public final class KyberKemContext implements KemContext {
MLKEMExtractor gen = new MLKEMExtractor(keyParam);
return gen.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("Kyber decapsulate failed", e);
}
}

View File

@@ -250,7 +250,7 @@ public final class NtruKemContext implements KemContext {
.createKey(key.getEncoded());
NTRUKEMExtractor ex = new NTRUKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("NTRU decapsulate failed", e);
}
}

View File

@@ -212,7 +212,7 @@ public final class NtrulPrimeKemContext implements KemContext {
.createKey(key.getEncoded());
NTRULPRimeKEMExtractor ex = new NTRULPRimeKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("NTRULPRime decapsulate failed", e);
}
}

View File

@@ -218,7 +218,7 @@ public final class SntruPrimeKemContext implements KemContext {
.createKey(key.getEncoded());
SNTRUPrimeKEMExtractor ex = new SNTRUPrimeKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("SNTRUPrime decapsulate failed", e);
}
}

View File

@@ -217,7 +217,7 @@ public final class SaberKemContext implements KemContext {
.createKey(key.getEncoded());
SABERKEMExtractor ex = new SABERKEMExtractor(keyParam);
return ex.extractSecret(ciphertext);
} catch (Exception e) { // NOPMD
} catch (Exception e) {
throw new IOException("SABER decapsulate failed", e);
}
}

View File

@@ -166,7 +166,7 @@ final class SmartContinuousBlockStream extends AbstractChunkTransformInputStream
out = outBuf = Arrays.copyOf(outBuf, outOff + finBlockSize); // NOPMD
}
int written = cipher.doFinal(in, inOff, len, out, outOff); // NOPMD
int written = cipher.doFinal(in, inOff, len, out, outOff);
return written;
// return cipher.doFinal(in, inOff, len, out, outOff);