8194864: Outputs more details for PKCS11 tests if the NSS lib version cannot be determined
It outputs the lib content if the lib version cannot be parsed Reviewed-by: xuelei
This commit is contained in:
parent
6b802a9513
commit
94ecb77665
test/jdk
@ -254,7 +254,6 @@ java/rmi/registry/readTest/CodebaseTest.java 8173324 windows-
|
||||
# jdk_security
|
||||
|
||||
sun/security/pkcs11/ec/TestKeyFactory.java 8026976 generic-all
|
||||
sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8186098 linux-all
|
||||
|
||||
sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-all
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -443,7 +443,17 @@ public abstract class PKCS11Test {
|
||||
|
||||
// the index after whitespace after nssHeader
|
||||
int afterheader = s.indexOf("NSS", i) + 4;
|
||||
String version = s.substring(afterheader, s.indexOf(' ', afterheader));
|
||||
int nextSpaceIndex = s.indexOf(' ', afterheader);
|
||||
|
||||
// If the next space is not found,
|
||||
// it has to print the content for further investigation.
|
||||
if (nextSpaceIndex == -1) {
|
||||
System.out.println("===== Content start =====");
|
||||
System.out.println(s);
|
||||
System.out.println("===== Content end =====");
|
||||
}
|
||||
|
||||
String version = s.substring(afterheader, nextSpaceIndex);
|
||||
|
||||
// If a "dot dot" release, strip the extra dots for double parsing
|
||||
String[] dot = version.split("\\.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user