[jboss-cvs] Repository SVN: r30552 - apache-xerces/2.7.1.patch02-brew/src.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 29 16:12:35 EDT 2009


Author: mbenitez
Date: 2009-10-29 16:12:35 -0400 (Thu, 29 Oct 2009)
New Revision: 30552

Added:
   apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1965.patch
Log:
Upgrade src for brew-build 2.7.1.patch02-brew with patch for JBPAPP-1965

Added: apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1965.patch
===================================================================
--- apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1965.patch	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1965.patch	2009-10-29 20:12:35 UTC (rev 30552)
@@ -0,0 +1,44 @@
+Index: src/org/apache/xerces/impl/xpath/regex/RangeToken.java
+===================================================================
+--- src/org/apache/xerces/impl/xpath/regex/RangeToken.java	(revision 320566)
++++ src/org/apache/xerces/impl/xpath/regex/RangeToken.java	(revision 320567)
+@@ -510,24 +510,30 @@
+     private static final int MAPSIZE = 256;
+     private void createMap() {
+         int asize = MAPSIZE/32;                 // 32 is the number of bits in `int'.
+-        this.map = new int[asize];
+-        this.nonMapIndex = this.ranges.length;
+-        for (int i = 0;  i < asize;  i ++)  this.map[i] = 0;
+-        for (int i = 0;  i < this.ranges.length;  i += 2) {
++        int [] map = new int[asize];
++        int nonMapIndex = this.ranges.length;
++        for (int i = 0; i < asize; ++i) {
++            map[i] = 0;
++        }
++        for (int i = 0; i < this.ranges.length;  i += 2) {
+             int s = this.ranges[i];
+             int e = this.ranges[i+1];
+             if (s < MAPSIZE) {
+-                for (int j = s;  j <= e && j < MAPSIZE;  j ++)
+-                    this.map[j/32] |= 1<<(j&0x1f); // s&0x1f : 0-31
+-            } else {
+-                this.nonMapIndex = i;
++                for (int j = s; j <= e && j < MAPSIZE; j++) {
++                    map[j/32] |= 1<<(j&0x1f); // s&0x1f : 0-31
++                }
++            } 
++            else {
++                nonMapIndex = i;
+                 break;
+             }
+             if (e >= MAPSIZE) {
+-                this.nonMapIndex = i;
++                nonMapIndex = i;
+                 break;
+             }
+         }
++        this.map = map;
++        this.nonMapIndex = nonMapIndex;
+         //for (int i = 0;  i < asize;  i ++)  System.err.println("Map: "+Integer.toString(this.map[i], 16));
+     }
+ 




More information about the jboss-cvs-commits mailing list