src/java.base/share/classes/sun/security/provider/PolicyParser.java
changeset 53018 8bf9268df0e2
parent 48757 8cc67294ec56
child 57950 4612a3cfb927
child 58678 9cf78a70fa4f
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   389      */
   389      */
   390     private void writeKeyStoreEntry(PrintWriter out) {
   390     private void writeKeyStoreEntry(PrintWriter out) {
   391         out.print("keystore \"");
   391         out.print("keystore \"");
   392         out.print(keyStoreUrlString);
   392         out.print(keyStoreUrlString);
   393         out.print('"');
   393         out.print('"');
   394         if (keyStoreType != null && keyStoreType.length() > 0)
   394         if (keyStoreType != null && !keyStoreType.isEmpty())
   395             out.print(", \"" + keyStoreType + "\"");
   395             out.print(", \"" + keyStoreType + "\"");
   396         if (keyStoreProvider != null && keyStoreProvider.length() > 0)
   396         if (keyStoreProvider != null && !keyStoreProvider.isEmpty())
   397             out.print(", \"" + keyStoreProvider + "\"");
   397             out.print(", \"" + keyStoreProvider + "\"");
   398         out.println(";");
   398         out.println(";");
   399         out.println();
   399         out.println();
   400     }
   400     }
   401 
   401 
   444                 int cctr = 0;
   444                 int cctr = 0;
   445                 while (aliases.hasMoreTokens()) {
   445                 while (aliases.hasMoreTokens()) {
   446                     String alias = aliases.nextToken().trim();
   446                     String alias = aliases.nextToken().trim();
   447                     if (alias.equals(","))
   447                     if (alias.equals(","))
   448                         cctr++;
   448                         cctr++;
   449                     else if (alias.length() > 0)
   449                     else if (!alias.isEmpty())
   450                         actr++;
   450                         actr++;
   451                 }
   451                 }
   452                 if (actr <= cctr)
   452                 if (actr <= cctr)
   453                     throw new ParsingException(
   453                     throw new ParsingException(
   454                             st.lineno(),
   454                             st.lineno(),