aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/sun/security/krb5/Config.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/sun/security/krb5/Config.java')
-rw-r--r--src/share/classes/sun/security/krb5/Config.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/share/classes/sun/security/krb5/Config.java b/src/share/classes/sun/security/krb5/Config.java
index eb2f335c55..fe6565cbab 100644
--- a/src/share/classes/sun/security/krb5/Config.java
+++ b/src/share/classes/sun/security/krb5/Config.java
@@ -291,7 +291,11 @@ public class Config {
}
/**
- * Gets all values for the specified keys.
+ * Gets all values (at least one) for the specified keys separated by
+ * a whitespace, or null if there is no such keys.
+ * The values can either be provided on a single line, or on multiple lines
+ * using the same key. When provided on a single line, the value can be
+ * comma or space separated.
* @throws IllegalArgumentException if any of the keys is illegal
* (See {@link #get})
*/
@@ -301,6 +305,7 @@ public class Config {
StringBuilder sb = new StringBuilder();
boolean first = true;
for (String s: v) {
+ s = s.replaceAll("[\\s,]+", " ");
if (first) {
sb.append(s);
first = false;