Skip to content

Commit ea186c2

Browse files
committed
More clear text in invalid pattern exception.
1 parent ef6eafc commit ea186c2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/java.base/share/classes/sun/security/jca/ProvidersFilter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,11 @@ private void nextState(Transition transition)
531531
// ^^^
532532
state = ParsingState.PRE_PATTERN;
533533
} else {
534-
throw new ParserException("Only whitespace characters" +
535-
" are valid after a pattern. Whitespaces that" +
536-
" are part of a provider name, service type " +
537-
"or algorithm must be escaped.", this);
534+
throw new ParserException("Unescaped whitespaces are " +
535+
"only valid at the end of a pattern. " +
536+
"Whitespace characters internal to a " +
537+
"provider name, service type or algorithm " +
538+
"must be escaped.", this);
538539
}
539540
} else {
540541
// Should not reach.

0 commit comments

Comments
 (0)