aboutsummaryrefslogtreecommitdiff
path: root/libjava/javax/naming/CompoundName.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/javax/naming/CompoundName.java')
-rw-r--r--libjava/javax/naming/CompoundName.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/javax/naming/CompoundName.java b/libjava/javax/naming/CompoundName.java
index 20b6cc51cb3..20396398d10 100644
--- a/libjava/javax/naming/CompoundName.java
+++ b/libjava/javax/naming/CompoundName.java
@@ -142,13 +142,17 @@ public class CompoundName implements Name, Cloneable, Serializable
// Otherwise, fall through.
}
// Quotes are only special at the start of a component.
- else if (new_element.length () == 0 && special == beginQuote)
+ else if (new_element.length () == 0
+ && special == beginQuote
+ && beginQuote != null)
{
quote = endQuote;
i += special.length ();
continue;
}
- else if (new_element.length () == 0 && special == beginQuote2)
+ else if (new_element.length () == 0
+ && special == beginQuote2
+ && beginQuote2 != null)
{
quote = endQuote2;
i += special.length ();