diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java index a1489c2c5a8..df6ce304d7b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java @@ -160,7 +160,7 @@ public interface Constants { public static final String STRING_SIG = "Ljava/lang/String;"; public static final String STRING_BUFFER_SIG - = "Ljava/lang/StringBuffer;"; + = "Ljava/lang/StringBuilder;"; public static final String OBJECT_SIG = "Ljava/lang/Object;"; public static final String DOUBLE_SIG @@ -318,7 +318,7 @@ public interface Constants { public static final String BOOLEAN_CLASS = "java.lang.Boolean"; public static final String STRING_BUFFER_CLASS - = "java.lang.StringBuffer"; + = "java.lang.StringBuilder"; public static final String STRING_WRITER = "java.io.StringWriter"; public static final String WRITER_SIG diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegularExpression.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegularExpression.java index 7ca00f4ff7f..6815f8b0ea0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegularExpression.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegularExpression.java @@ -707,14 +707,9 @@ public class RegularExpression implements java.io.Serializable { synchronized (this) { if (this.operations == null) this.prepare(); - if (this.context == null) - this.context = new Context(); - } - Context con = null; - synchronized (this.context) { - con = this.context.inuse ? new Context() : this.context; - con.reset(target, start, end, this.numberOfClosures); } + Context con = new Context(); + con.reset(target, start, end, this.numberOfClosures); if (match != null) { match.setNumberOfGroups(this.nofparen); match.setSource(target); @@ -892,14 +887,9 @@ public class RegularExpression implements java.io.Serializable { synchronized (this) { if (this.operations == null) this.prepare(); - if (this.context == null) - this.context = new Context(); - } - Context con = null; - synchronized (this.context) { - con = this.context.inuse ? new Context() : this.context; - con.reset(target, start, end, this.numberOfClosures); } + Context con = new Context(); + con.reset(target, start, end, this.numberOfClosures); if (match != null) { match.setNumberOfGroups(this.nofparen); match.setSource(target); @@ -1572,14 +1562,9 @@ public class RegularExpression implements java.io.Serializable { synchronized (this) { if (this.operations == null) this.prepare(); - if (this.context == null) - this.context = new Context(); - } - Context con = null; - synchronized (this.context) { - con = this.context.inuse ? new Context() : this.context; - con.reset(target, start, end, this.numberOfClosures); } + Context con = new Context(); + con.reset(target, start, end, this.numberOfClosures); if (match != null) { match.setNumberOfGroups(this.nofparen); match.setSource(target); @@ -2082,7 +2067,7 @@ public class RegularExpression implements java.io.Serializable { this.limit = limit; this.resetCommon(nofclosures); } - synchronized void setInUse(boolean inUse) { + void setInUse(boolean inUse) { this.inuse = inUse; } } @@ -2295,7 +2280,6 @@ public class RegularExpression implements java.io.Serializable { this.hasBackReferences = rp.hasBackReferences; this.operations = null; - this.context = null; } /** *