Skip to content

Commit f31dead

Browse files
djelinskiwangweij
authored andcommitted
8279043: Some Security Exception Messages Miss Spaces
Reviewed-by: weijun
1 parent f730906 commit f31dead

File tree

16 files changed

+21
-21
lines changed

16 files changed

+21
-21
lines changed

src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ public int doFinal(ByteBuffer src, ByteBuffer dst) throws
13041304
// 'len' includes ibuffer data
13051305
checkDataLength(len, tagLenBytes);
13061306
if (dst.remaining() < len + tagLenBytes) {
1307-
throw new ShortBufferException("Output buffer too small, must" +
1307+
throw new ShortBufferException("Output buffer too small, must " +
13081308
"be at least " + (len + tagLenBytes) + " bytes long");
13091309
}
13101310

@@ -1472,7 +1472,7 @@ public int doFinal(byte[] in, int inOfs, int inLen, byte[] out,
14721472
}
14731473

14741474
if (len - tagLenBytes > out.length - outOfs) {
1475-
throw new ShortBufferException("Output buffer too small, must" +
1475+
throw new ShortBufferException("Output buffer too small, must " +
14761476
"be at least " + (len - tagLenBytes) + " bytes long");
14771477
}
14781478

src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private SecretKey engineGenerateKey0(byte[] masterSecret) throws GeneralSecurity
213213
if (protocolVersion >= 0x0302) {
214214
// TLS 1.1+
215215
throw new RuntimeException(
216-
"Internal Error: TLS 1.1+ should not be negotiating" +
216+
"Internal Error: TLS 1.1+ should not be negotiating " +
217217
"exportable ciphersuites");
218218
} else if (protocolVersion == 0x0301) {
219219
// TLS 1.0

src/java.base/share/classes/javax/crypto/Cipher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ private static String[] tokenizeTransformation(String transformation)
340340
"format:" + transformation);
341341
}
342342
if ((parts[0] == null) || (parts[0].isEmpty())) {
343-
throw new NoSuchAlgorithmException("Invalid transformation:" +
343+
throw new NoSuchAlgorithmException("Invalid transformation: " +
344344
"algorithm not specified-"
345345
+ transformation);
346346
}

src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ public PKCS9Attribute(DerValue derVal) throws IOException {
481481
"attribute not supported.");
482482
// break unnecessary
483483
case 10: // issuerAndserialNumber attribute -- not supported
484-
throw new IOException("PKCS9 IssuerAndSerialNumber" +
484+
throw new IOException("PKCS9 IssuerAndSerialNumber " +
485485
"attribute not supported.");
486486
// break unnecessary
487487
case 11: // RSA DSI proprietary
488488
case 12: // RSA DSI proprietary
489-
throw new IOException("PKCS9 RSA DSI attributes" +
489+
throw new IOException("PKCS9 RSA DSI attributes " +
490490
"11 and 12, not supported.");
491491
// break unnecessary
492492
case 13: // S/MIME unused attribute
@@ -604,12 +604,12 @@ public void derEncode(OutputStream out) throws IOException {
604604
"attribute not supported.");
605605
// break unnecessary
606606
case 10: // issuerAndserialNumber attribute -- not supported
607-
throw new IOException("PKCS9 IssuerAndSerialNumber" +
607+
throw new IOException("PKCS9 IssuerAndSerialNumber " +
608608
"attribute not supported.");
609609
// break unnecessary
610610
case 11: // RSA DSI proprietary
611611
case 12: // RSA DSI proprietary
612-
throw new IOException("PKCS9 RSA DSI attributes" +
612+
throw new IOException("PKCS9 RSA DSI attributes " +
613613
"11 and 12, not supported.");
614614
// break unnecessary
615615
case 13: // S/MIME unused attribute

src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ private void setKeyEntry(String alias, Key key,
635635
}
636636
}
637637
} else {
638-
throw new KeyStoreException("Private key is not encoded" +
638+
throw new KeyStoreException("Private key is not encoded " +
639639
"as PKCS#8");
640640
}
641641

src/java.base/share/classes/sun/security/rsa/RSAPadding.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public byte[] pad(byte[] data, int ofs, int len)
270270
*/
271271
public byte[] unpad(byte[] padded) throws BadPaddingException {
272272
if (padded.length != paddedSize) {
273-
throw new BadPaddingException("Decryption error." +
273+
throw new BadPaddingException("Decryption error. " +
274274
"The padded array length (" + padded.length +
275275
") is not the specified padded size (" + paddedSize + ")");
276276
}

src/java.base/share/classes/sun/security/ssl/CertificateAuthoritiesExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public byte[] produce(ConnectionContext context,
211211
if (encodedCAs.isEmpty()) {
212212
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
213213
SSLLogger.warning(
214-
"The number of CAs exceeds the maximum size" +
214+
"The number of CAs exceeds the maximum size " +
215215
"of the certificate_authorities extension");
216216
}
217217

src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ public boolean permits(Key key) {
451451
for (Constraint constraint : list) {
452452
if (!constraint.permits(key)) {
453453
if (debug != null) {
454-
debug.println("Constraints: failed key size" +
454+
debug.println("Constraints: failed key size " +
455455
"constraint check " + KeyUtil.getKeySize(key));
456456
}
457457
return false;

src/java.base/share/classes/sun/security/x509/PolicyConstraintsExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ public PolicyConstraintsExtension(Boolean critical, Object value)
154154

155155
if (next.isContextSpecific(TAG_REQUIRE) && !next.isConstructed()) {
156156
if (this.require != -1)
157-
throw new IOException("Duplicate requireExplicitPolicy" +
157+
throw new IOException("Duplicate requireExplicitPolicy " +
158158
"found in the PolicyConstraintsExtension");
159159
next.resetTag(DerValue.tag_Integer);
160160
this.require = next.getInteger();
161161

162162
} else if (next.isContextSpecific(TAG_INHIBIT) &&
163163
!next.isConstructed()) {
164164
if (this.inhibit != -1)
165-
throw new IOException("Duplicate inhibitPolicyMapping" +
165+
throw new IOException("Duplicate inhibitPolicyMapping " +
166166
"found in the PolicyConstraintsExtension");
167167
next.resetTag(DerValue.tag_Integer);
168168
this.inhibit = next.getInteger();

src/java.base/share/classes/sun/security/x509/PolicyInformation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public void set(String name, Object obj) throws IOException {
202202
if (obj instanceof Set) {
203203
for (Object obj1 : (Set<?>) obj) {
204204
if (!(obj1 instanceof PolicyQualifierInfo)) {
205-
throw new IOException("Attribute value must be a" +
205+
throw new IOException("Attribute value must be a " +
206206
"Set of PolicyQualifierInfo objects.");
207207
}
208208
}

0 commit comments

Comments
 (0)