lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1306930 - /lucene/dev/branches/lucene3930/modules/benchmark/lib/XERCESJ-1257_PLUS_JAVA7.patch.txt
Date Thu, 29 Mar 2012 15:42:06 GMT
Author: rmuir
Date: Thu Mar 29 15:42:06 2012
New Revision: 1306930

URL: http://svn.apache.org/viewvc?rev=1306930&view=rev
Log:
LUCENE-3930: commit patch for xerces jar, also with patches to xjavac and 'compile-xjavac'
task that must be run first, if you use java7

Added:
    lucene/dev/branches/lucene3930/modules/benchmark/lib/XERCESJ-1257_PLUS_JAVA7.patch.txt
  (with props)

Added: lucene/dev/branches/lucene3930/modules/benchmark/lib/XERCESJ-1257_PLUS_JAVA7.patch.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/modules/benchmark/lib/XERCESJ-1257_PLUS_JAVA7.patch.txt?rev=1306930&view=auto
==============================================================================
--- lucene/dev/branches/lucene3930/modules/benchmark/lib/XERCESJ-1257_PLUS_JAVA7.patch.txt
(added)
+++ lucene/dev/branches/lucene3930/modules/benchmark/lib/XERCESJ-1257_PLUS_JAVA7.patch.txt
Thu Mar 29 15:42:06 2012
@@ -0,0 +1,69 @@
+Index: build.xml
+===================================================================
+--- build.xml	(revision 1306887)
++++ build.xml	(working copy)
+@@ -323,6 +323,21 @@
+   </target>
+ 
+   <!-- =================================================================== -->
++  <!-- Compiles xjavac itself                                              -->
++  <!-- =================================================================== -->
++  <target name="compile-xjavac">
++    <sequential>
++    <mkdir dir="${build.dir}/xjavac-src/org/apache/xerces/util"/>
++    <mkdir dir="${build.dir}/xjavac-bin"/>
++    <copy todir="${build.dir}/xjavac-src/org/apache/xerces/util"
++          file="${tools.dir}/src/XJavac.java"/>
++    <javac srcdir="${build.dir}/xjavac-src" destdir="${build.dir}/xjavac-bin"/>
++    <delete file="${tools.dir}/bin/xjavac.jar"/>
++    <jar destfile="${tools.dir}/bin/xjavac.jar" basedir="${build.dir}/xjavac-bin"/>
++    </sequential>
++  </target>
++
++  <!-- =================================================================== -->
+   <!-- Compiles the tests                                                  -->
+   <!-- =================================================================== -->
+   <target name="tests" depends="samples">
+Index: tools/src/XJavac.java
+===================================================================
+--- tools/src/XJavac.java	(revision 1306887)
++++ tools/src/XJavac.java	(working copy)
+@@ -62,13 +62,15 @@
+                 setBootclasspath(createIBMJDKBootclasspath());
+             }
+             // need to do special things for Sun too and also
+-            // for Apple, HP, SableVM, Kaffe and Blackdown: a Linux port of Sun Java
++            // for Apple, HP, FreeBSD, SableVM, Kaffe and Blackdown: a Linux port of Sun
Java
+             else if( (vendor.indexOf("SUN") >= 0) || 
+                      (vendor.indexOf("BLACKDOWN") >= 0) || 
+                      (vendor.indexOf("APPLE") >= 0) ||
+                      (vendor.indexOf("HEWLETT-PACKARD") >= 0) ||
+                      (vendor.indexOf("KAFFE") >= 0) ||
+-                     (vendor.indexOf("SABLE") >= 0)) {
++                     (vendor.indexOf("SABLE") >= 0) ||
++                     (vendor.indexOf("ORACLE") >= 0) ||
++                     (vendor.indexOf("FREEBSD") >= 0)) {
+                 // we're on an SUN 1.4 or higher; fiddle with the bootclasspath.
+                 // since we can't eviscerate XML-related info here,
+                 // we must use the classpath
+Index: src/org/apache/xerces/impl/io/UTF8Reader.java
+===================================================================
+--- src/org/apache/xerces/impl/io/UTF8Reader.java	(revision 1306887)
++++ src/org/apache/xerces/impl/io/UTF8Reader.java	(working copy)
+@@ -533,6 +533,16 @@
+                     invalidByte(4, 4, b2);
+                 }
+ 
++                // check if output buffer is large enough to hold 2 surrogate chars
++                if(out + 1 >= ch.length ){
++                    fBuffer[0] = (byte)b0;
++                    fBuffer[1] = (byte)b1;
++                    fBuffer[2] = (byte)b2;
++                    fBuffer[3] = (byte)b3;
++                    fOffset = 4;
++                    return out - offset;
++                }
++
+                 // decode bytes into surrogate characters
+                 int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003);
+                 if (uuuuu > 0x10) {



Mime
View raw message