Skip to content

Commit

Permalink
8333046: Clean codes in sun.security.util.math
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshajiang committed May 28, 2024
1 parent 87a06b6 commit bac6397
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

package sun.security.util.math;

import java.math.BigInteger;

/**
* An interface for the field of integers modulo a prime number. An
* implementation of this interface can be used to get properties of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ public MutableElement setSquare() {
numAdds = 0;
}

numAdds = IntegerPolynomial.this.square(limbs, limbs);;
numAdds = IntegerPolynomial.this.square(limbs, limbs);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import sun.security.util.math.IntegerMontgomeryFieldModuloP;
import sun.security.util.math.SmallValue;
import sun.security.util.math.IntegerFieldModuloP;
import java.lang.Math;
import java.math.BigInteger;
import jdk.internal.vm.annotation.IntrinsicCandidate;

Expand Down Expand Up @@ -110,7 +109,7 @@ public ImmutableElement getElement(BigInteger v) {

@Override
public SmallValue getSmallValue(int value) {
// Explicitely here as reminder that SmallValue stays in residue domain
// Explicitly here as reminder that SmallValue stays in residue domain
// See multByInt below for how this is used
return super.getSmallValue(value);
}
Expand Down Expand Up @@ -557,4 +556,4 @@ protected void reduceIn(long[] limbs, long v, int i) {
limbs[i - 5] += (v << 4) & LIMB_MASK;
limbs[i - 4] += v >> 48;
}
}
}
2 changes: 1 addition & 1 deletion test/jdk/com/sun/security/ec/ECOperationsKATTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,4 @@ int main(){
BN_CTX_free(ctx);
return 0;
}
*/
*/
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ public static void main(String[] args) throws Exception {
}
}

//make test TEST="test/jdk/com/sun/security/util/math/intpoly/IntegerPolynomialTest.java"
//make test TEST="test/jdk/com/sun/security/util/math/intpoly/IntegerPolynomialTest.java"
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ public static void run() throws Exception {
}
}

//make test TEST="test/jdk/com/sun/security/util/math/intpoly/MontgomeryPolynomialFuzzTest.java"
//make test TEST="test/jdk/com/sun/security/util/math/intpoly/MontgomeryPolynomialFuzzTest.java"

0 comments on commit bac6397

Please sign in to comment.