diff -up harmony/java/security/spec/ECFieldF2m.java.messages harmony/java/security/spec/ECFieldF2m.java --- harmony/java/security/spec/ECFieldF2m.java.messages 2014-11-01 23:34:21.657100078 +0100 +++ harmony/java/security/spec/ECFieldF2m.java 2014-11-01 23:43:56.218997835 +0100 @@ -20,8 +20,6 @@ package java.security.spec; import java.math.BigInteger; import java.util.Arrays; -import org.apache.harmony.security.internal.nls.Messages; - /** * The parameters specifying a <i>characteristic 2 finite field</i> of an * elliptic curve. @@ -54,7 +52,7 @@ public class ECFieldF2m implements ECFie public ECFieldF2m(int m) { this.m = m; if (this.m <= 0) { - throw new IllegalArgumentException(Messages.getString("security.75")); //$NON-NLS-1$ + throw new IllegalArgumentException("m"); //$NON-NLS-1$ } this.rp = null; this.ks = null; @@ -79,11 +77,11 @@ public class ECFieldF2m implements ECFie public ECFieldF2m(int m, BigInteger rp) { this.m = m; if (this.m <= 0) { - throw new IllegalArgumentException(Messages.getString("security.75")); //$NON-NLS-1$ + throw new IllegalArgumentException("m"); //$NON-NLS-1$ } this.rp = rp; if (this.rp == null) { - throw new NullPointerException(Messages.getString("security.76")); //$NON-NLS-1$ + throw new NullPointerException("rp"); //$NON-NLS-1$ } // the leftmost bit must be (m+1)-th one, // set bits count must be 3 or 5, @@ -92,7 +90,7 @@ public class ECFieldF2m implements ECFie if ((this.rp.bitLength() != (m+1)) || (rp_bc != TPB_LEN && rp_bc != PPB_LEN) || (!this.rp.testBit(0) || !this.rp.testBit(m)) ) { - throw new IllegalArgumentException(Messages.getString("security.77")); //$NON-NLS-1$ + throw new IllegalArgumentException("rp"); //$NON-NLS-1$ } // setup ks using rp: @@ -125,7 +123,7 @@ public class ECFieldF2m implements ECFie public ECFieldF2m(int m, int[] ks) { this.m = m; if (this.m <= 0) { - throw new IllegalArgumentException(Messages.getString("security.75")); //$NON-NLS-1$ + throw new IllegalArgumentException("m"); //$NON-NLS-1$ } // Defensively copies array parameter // to prevent subsequent modification. @@ -136,7 +134,7 @@ public class ECFieldF2m implements ECFie // no need to check for null already if (this.ks.length != TPB_MID_LEN && this.ks.length != PPB_MID_LEN) { // must be either trinomial or pentanomial basis - throw new IllegalArgumentException(Messages.getString("security.78")); //$NON-NLS-1$ + throw new IllegalArgumentException("ks"); //$NON-NLS-1$ } // trinomial basis: // check that m > k >= 1, where k is ks[0] @@ -155,7 +153,7 @@ public class ECFieldF2m implements ECFie break; } if (checkFailed || prev < 1) { - throw new IllegalArgumentException(Messages.getString("security.79")); //$NON-NLS-1$ + throw new IllegalArgumentException("check failed"); //$NON-NLS-1$ } // Setup rp using ks: diff -up harmony/java/security/spec/ECFieldFp.java.messages harmony/java/security/spec/ECFieldFp.java --- harmony/java/security/spec/ECFieldFp.java.messages 2014-11-01 23:34:32.931881891 +0100 +++ harmony/java/security/spec/ECFieldFp.java 2014-11-01 23:44:43.677081228 +0100 @@ -19,8 +19,6 @@ package java.security.spec; import java.math.BigInteger; -import org.apache.harmony.security.internal.nls.Messages; - /** * The parameters specifying a <i>prime finite field</i> of an * elliptic curve. @@ -42,10 +40,10 @@ public class ECFieldFp implements ECFiel this.p = p; if (this.p == null) { - throw new NullPointerException(Messages.getString("security.83", "p")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("p"); //$NON-NLS-1$ //$NON-NLS-2$ } if (this.p.signum() != 1) { - throw new IllegalArgumentException(Messages.getString("security.86", "p")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new IllegalArgumentException("p"); //$NON-NLS-1$ //$NON-NLS-2$ } } diff -up harmony/java/security/spec/ECParameterSpec.java.messages harmony/java/security/spec/ECParameterSpec.java --- harmony/java/security/spec/ECParameterSpec.java.messages 2014-11-01 23:33:07.388537348 +0100 +++ harmony/java/security/spec/ECParameterSpec.java 2014-11-01 23:46:10.832397919 +0100 @@ -19,8 +19,6 @@ package java.security.spec; import java.math.BigInteger; -import org.apache.harmony.security.internal.nls.Messages; - /** * The parameter specification used with Elliptic Curve Cryptography (ECC). */ @@ -58,22 +56,22 @@ public class ECParameterSpec implements this.cofactor = cofactor; // throw NullPointerException if curve, generator or order is null if (this.curve == null) { - throw new NullPointerException(Messages.getString("security.83", "curve")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("curve"); //$NON-NLS-1$ //$NON-NLS-2$ } if (this.generator == null) { - throw new NullPointerException(Messages.getString("security.83", "generator")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("generator"); //$NON-NLS-1$ //$NON-NLS-2$ } if (this.order == null) { - throw new NullPointerException(Messages.getString("security.83", "order")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("order"); //$NON-NLS-1$ //$NON-NLS-2$ } // throw IllegalArgumentException if order or cofactor is not positive if (!(this.order.compareTo(BigInteger.ZERO) > 0)) { throw new - IllegalArgumentException(Messages.getString("security.86", "order")); //$NON-NLS-1$ //$NON-NLS-2$ + IllegalArgumentException("order"); //$NON-NLS-1$ //$NON-NLS-2$ } if (!(this.cofactor > 0)) { throw new - IllegalArgumentException(Messages.getString("security.86", "cofactor")); //$NON-NLS-1$ //$NON-NLS-2$ + IllegalArgumentException("cofactor"); //$NON-NLS-1$ //$NON-NLS-2$ } } diff -up harmony/java/security/spec/ECPoint.java.messages harmony/java/security/spec/ECPoint.java --- harmony/java/security/spec/ECPoint.java.messages 2014-11-01 23:26:23.469355291 +0100 +++ harmony/java/security/spec/ECPoint.java 2014-11-01 23:46:57.473497105 +0100 @@ -19,8 +19,6 @@ package java.security.spec; import java.math.BigInteger; -import org.apache.harmony.security.internal.nls.Messages; - /** * A Point on an Elliptic Curve in barycentric (or affine) coordinates. */ @@ -52,11 +50,11 @@ public class ECPoint { public ECPoint(BigInteger affineX, BigInteger affineY) { this.affineX = affineX; if (this.affineX == null) { - throw new NullPointerException(Messages.getString("security.83", "X")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("X"); //$NON-NLS-1$ //$NON-NLS-2$ } this.affineY = affineY; if (this.affineY == null) { - throw new NullPointerException(Messages.getString("security.83", "Y")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("Y"); //$NON-NLS-1$ //$NON-NLS-2$ } } diff -up harmony/java/security/spec/EllipticCurve.java.messages harmony/java/security/spec/EllipticCurve.java --- harmony/java/security/spec/EllipticCurve.java.messages 2014-11-01 23:33:52.388666483 +0100 +++ harmony/java/security/spec/EllipticCurve.java 2014-11-01 23:48:14.199015258 +0100 @@ -20,8 +20,6 @@ package java.security.spec; import java.math.BigInteger; import java.util.Arrays; -import org.apache.harmony.security.internal.nls.Messages; - /** * An Elliptic Curve with its necessary values. */ @@ -61,15 +59,15 @@ public class EllipticCurve { public EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) { this.field = field; if (this.field == null) { - throw new NullPointerException(Messages.getString("security.7A")); //$NON-NLS-1$ + throw new NullPointerException("field"); //$NON-NLS-1$ } this.a = a; if (this.a == null) { - throw new NullPointerException(Messages.getString("security.7B")); //$NON-NLS-1$ + throw new NullPointerException("a"); //$NON-NLS-1$ } this.b = b; if (this.b == null) { - throw new NullPointerException(Messages.getString("security.7C")); //$NON-NLS-1$ + throw new NullPointerException("b"); //$NON-NLS-1$ } // make defensive copy if (seed == null) { @@ -84,18 +82,18 @@ public class EllipticCurve { if (this.field instanceof ECFieldFp) { BigInteger p = ((ECFieldFp) this.field).getP(); if (this.a.signum() < 0 || this.a.compareTo(p) >= 0) { - throw new IllegalArgumentException(Messages.getString("security.7D")); //$NON-NLS-1$ + throw new IllegalArgumentException("a"); //$NON-NLS-1$ } if (this.b.signum() < 0 || this.b.compareTo(p) >= 0) { - throw new IllegalArgumentException(Messages.getString("security.7E")); //$NON-NLS-1$ + throw new IllegalArgumentException("b"); //$NON-NLS-1$ } } else if (this.field instanceof ECFieldF2m) { int fieldSizeInBits = this.field.getFieldSize(); if (!(this.a.bitLength() <= fieldSizeInBits)) { - throw new IllegalArgumentException(Messages.getString("security.7D")); //$NON-NLS-1$ + throw new IllegalArgumentException("a"); //$NON-NLS-1$ } if (!(this.b.bitLength() <= fieldSizeInBits)) { - throw new IllegalArgumentException(Messages.getString("security.7E")); //$NON-NLS-1$ + throw new IllegalArgumentException("b"); //$NON-NLS-1$ } } } diff -up harmony/java/security/spec/ECPrivateKeySpec.java.messages harmony/java/security/spec/ECPrivateKeySpec.java --- harmony/java/security/spec/ECPrivateKeySpec.java.messages 2014-11-02 04:28:44.712718458 +0100 +++ harmony/java/security/spec/ECPrivateKeySpec.java 2014-11-02 04:31:49.652174017 +0100 @@ -19,8 +19,6 @@ package java.security.spec; import java.math.BigInteger; -import org.apache.harmony.security.internal.nls.Messages; - /** * The parameters specifying an Elliptic Curve (EC) private key. */ @@ -44,10 +42,10 @@ public class ECPrivateKeySpec implements this.params = params; // throw NullPointerException if s or params is null if (this.s == null) { - throw new NullPointerException(Messages.getString("security.83", "s")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("s"); //$NON-NLS-1$ //$NON-NLS-2$ } if (this.params == null) { - throw new NullPointerException(Messages.getString("security.83", "params")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("params"); //$NON-NLS-1$ //$NON-NLS-2$ } } diff -up harmony/java/security/spec/ECPublicKeySpec.java.messages harmony/java/security/spec/ECPublicKeySpec.java --- harmony/java/security/spec/ECPublicKeySpec.java.messages 2014-11-02 04:28:04.813483274 +0100 +++ harmony/java/security/spec/ECPublicKeySpec.java 2014-11-02 04:31:28.110586820 +0100 @@ -17,8 +17,6 @@ package java.security.spec; -import org.apache.harmony.security.internal.nls.Messages; - /** * The parameters specifying an Elliptic Curve (EC) public key. */ @@ -44,15 +42,15 @@ public class ECPublicKeySpec implements this.params = params; // throw NullPointerException if w or params is null if (this.w == null) { - throw new NullPointerException(Messages.getString("security.83", "w")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("w"); //$NON-NLS-1$ //$NON-NLS-2$ } if (this.params == null) { - throw new NullPointerException(Messages.getString("security.83", "params")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("params"); //$NON-NLS-1$ //$NON-NLS-2$ } // throw IllegalArgumentException if w is point at infinity if (this.w.equals(ECPoint.POINT_INFINITY)) { throw new IllegalArgumentException( - Messages.getString("security.84")); //$NON-NLS-1$ + "w"); //$NON-NLS-1$ } } diff -up harmony/java/security/spec/ECGenParameterSpec.java.messages harmony/java/security/spec/ECGenParameterSpec.java --- harmony/java/security/spec/ECGenParameterSpec.java.messages 2014-11-02 05:32:19.014409580 +0100 +++ harmony/java/security/spec/ECGenParameterSpec.java 2014-11-02 05:33:06.810489397 +0100 @@ -17,8 +17,6 @@ package java.security.spec; -import org.apache.harmony.security.internal.nls.Messages; - /** * The parameter specification used to generate elliptic curve domain parameters. */ @@ -37,7 +35,7 @@ public ECGenParameterSpec(String name) { this.name = name; if (this.name == null) { - throw new NullPointerException(Messages.getString("security.83", "name")); //$NON-NLS-1$ //$NON-NLS-2$ + throw new NullPointerException("name"); //$NON-NLS-1$ //$NON-NLS-2$ } }