vgritsenko2003/09/05 18:45:51
Modified:.build.xml
docs changes.html
src/java/org/apache/regexp RE.java RETest.java
xdocschanges.xml
Log:
Starting 1.4-dev. Fixing bug #22928. Adding test for bug #22928.
Revision ChangesPath
1.5 +2 -1 jakarta-regexp/build.xml
Index: build.xml
===
RCS file: /home/cvs/jakarta-regexp/build.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- build.xml 2 Sep 2003 16:30:39 - 1.4
+++ build.xml 6 Sep 2003 01:45:51 - 1.5
@@ -22,7 +22,7 @@
property name=ant.home value=./
property name=Name value=Jakarta-Regexp/
property name=year value=2001-2003/
-property name=version value=1.3/
+property name=version value=1.4-dev/
property name=project value=jakarta-regexp/
property name=build.dir value=build/
@@ -84,6 +84,7 @@
!-- Compiles the source directory --
!-- === --
target name=compile depends=prepare
+echo message=Compiling with Java ${ant.java.version}, debug ${debug},
optimize ${optimize}, deprecation ${deprecation}/
javac srcdir=${build.src}
destdir=${build.dest}
excludes=**/package.html
1.13 +6 -0 jakarta-regexp/docs/changes.html
Index: changes.html
===
RCS file: /home/cvs/jakarta-regexp/docs/changes.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- changes.html 2 Sep 2003 16:30:39 - 1.12
+++ changes.html 6 Sep 2003 01:45:51 - 1.13
@@ -80,6 +80,12 @@
This document reflects the changes between releases for the Jakarta Regexp
package.
/p
+h3Version 1.4-dev/h3
+ul
+liFixed Bug
+a href=http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22928;22928/a:
+subst() with REPLACE_BACKREFERENCES cuts first 2 characters (VG)/li
+/ul
h3Version 1.3/h3
ul
liFixed Bug
1.14 +14 -3 jakarta-regexp/src/java/org/apache/regexp/RE.java
Index: RE.java
===
RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RE.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- RE.java 2 Jun 2003 02:18:41 - 1.13
+++ RE.java 6 Sep 2003 01:45:51 - 1.14
@@ -1733,6 +1733,7 @@
int lCurrentPosition = 0;
int lLastPosition = 0;
int lLength = substitution.length();
+boolean bAddedPrefix = false;
while ((lCurrentPosition = substitution.indexOf($,
lCurrentPosition)) = 0)
{
@@ -1742,8 +1743,18 @@
char c = substitution.charAt(lCurrentPosition + 1);
if (c = '0' c = '9')
{
-// Append everything between the last and the current $
sign
-ret.append(substitution.substring(lLastPosition+2,
lCurrentPosition));
+if (bAddedPrefix == false)
+{
+// Append everything between the beginning of the
+// substitution string and the current $ sign
+ret.append(substitution.substring(0,
lCurrentPosition));
+bAddedPrefix = true;
+}
+else
+{
+// Append everything between the last and the
current $ sign
+ret.append(substitution.substring(lLastPosition +
2, lCurrentPosition));
+}
// Append the parenthesized expression
// Note: if a parenthesized expression of the requested
1.6 +30 -12jakarta-regexp/src/java/org/apache/regexp/RETest.java
Index: RETest.java
===
RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RETest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RETest.java 2 May 2003 01:03:47 - 1.5
+++ RETest.java 6 Sep 2003 01:45:51 - 1.6
@@ -325,12 +325,12 @@