You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mu...@apache.org on 2022/08/16 10:32:29 UTC
[xalan-java] branch xalan-j_2_7_1_maint updated: xalanj commit : undoing the logic of previous commit, since it had unwanted codebase side effects
This is an automated email from the ASF dual-hosted git repository.
mukulg pushed a commit to branch xalan-j_2_7_1_maint
in repository https://gitbox.apache.org/repos/asf/xalan-java.git
The following commit(s) were added to refs/heads/xalan-j_2_7_1_maint by this push:
new 4ef275f0 xalanj commit : undoing the logic of previous commit, since it had unwanted codebase side effects
4ef275f0 is described below
commit 4ef275f0c5353455d6066ae0ac7fa0b3c3afd85d
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Tue Aug 16 16:02:08 2022 +0530
xalanj commit : undoing the logic of previous commit, since it had
unwanted codebase side effects
---
build.xml | 7 ++--
lib/BCEL.jar | Bin 0 -> 491665 bytes
lib/bcel-6.5.0.jar | Bin 695048 -> 0 bytes
.../xalan/xsltc/trax/TemplatesHandlerImpl.java | 4 +-
src/org/apache/xalan/xsltc/trax/TemplatesImpl.java | 41 ++-------------------
.../xalan/xsltc/trax/TransformerFactoryImpl.java | 22 ++---------
6 files changed, 12 insertions(+), 62 deletions(-)
diff --git a/build.xml b/build.xml
index 4554b888..7b93569d 100644
--- a/build.xml
+++ b/build.xml
@@ -102,8 +102,7 @@ $Id$
<property name="xmlapis.jar" value="${endorsed.dir}/${xmlapis.jar.name}"/>
<property name="parser.jar.name" value="xercesImpl.jar"/>
<property name="parser.jar" value="${endorsed.dir}/${parser.jar.name}"/>
- <!-- <property name="bcel.jar.name" value="BCEL.jar"/> -->
- <property name="bcel.jar.name" value="bcel-6.5.0.jar"/>
+ <property name="bcel.jar.name" value="BCEL.jar"/>
<property name="bcel.jar" value="${lib.dir}/${bcel.jar.name}"/>
<property name="runtime.jar.name" value="runtime.jar"/>
<property name="runtime.jar" value="${lib.dir}/${runtime.jar.name}"/>
@@ -1476,7 +1475,7 @@ $Id$
<!-- =================================================================== -->
<!-- Compiles and runs mini/smoketest from xml-xalan\test, if present -->
<!-- =================================================================== -->
- <property name="test.relpath" value="../xalan-test"/>
+ <property name="test.relpath" value="../test"/>
<target name="minitest" depends="prepare,minitest-run,tests-not-available"
description="Run the Minitest from xml-xalan/test" >
@@ -1868,4 +1867,4 @@ $Id$
# END OF SECTION TO BUILD STAND-ALONE SERIALIZER #
################################################## -->
-</project>
+</project>
\ No newline at end of file
diff --git a/lib/BCEL.jar b/lib/BCEL.jar
new file mode 100644
index 00000000..644f8763
Binary files /dev/null and b/lib/BCEL.jar differ
diff --git a/lib/bcel-6.5.0.jar b/lib/bcel-6.5.0.jar
deleted file mode 100644
index 18bcc0ad..00000000
Binary files a/lib/bcel-6.5.0.jar and /dev/null differ
diff --git a/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java b/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java
index 54b9634e..cda21d3b 100644
--- a/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java
+++ b/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java
@@ -249,8 +249,7 @@ public class TemplatesHandlerImpl
if (bytecodes != null) {
_templates =
new TemplatesImpl(xsltc.getBytecodes(), transletName,
- _parser.getOutputProperties(), _indentNumber, _tfactory,
- null, null, null);
+ _parser.getOutputProperties(), _indentNumber, _tfactory);
// Set URIResolver on templates object
if (_uriResolver != null) {
@@ -342,4 +341,3 @@ public class TemplatesHandlerImpl
}
}
-
diff --git a/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java b/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
index bc3854e0..76df1ce7 100644
--- a/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
+++ b/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
@@ -21,7 +21,6 @@
package org.apache.xalan.xsltc.trax;
-import java.io.File;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -116,12 +115,6 @@ public final class TemplatesImpl implements Templates, Serializable {
* object belongs to.
*/
private transient TransformerFactoryImpl _tfactory = null;
-
- private File _currTransletFile;
-
- private File[] _currTransletAuxfiles;
-
- private File _currTransletJarfile;
static final class TransletClassLoader extends ClassLoader {
TransletClassLoader(ClassLoader parent) {
@@ -144,17 +137,13 @@ public final class TemplatesImpl implements Templates, Serializable {
*/
protected TemplatesImpl(byte[][] bytecodes, String transletName,
Properties outputProperties, int indentNumber,
- TransformerFactoryImpl tfactory, File currTransletFile, File[] currTransletAuxfiles,
- File currTransletJarfile)
+ TransformerFactoryImpl tfactory)
{
_bytecodes = bytecodes;
_name = transletName;
_outputProperties = outputProperties;
_indentNumber = indentNumber;
_tfactory = tfactory;
- _currTransletFile = currTransletFile;
- _currTransletAuxfiles = currTransletAuxfiles;
- _currTransletJarfile = currTransletJarfile;
}
/**
@@ -325,8 +314,7 @@ public final class TemplatesImpl implements Templates, Serializable {
}
}
catch (ClassFormatError e) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_CLASS_ERR, _name);
- deleteMalformedTransletClassFiles();
+ ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_CLASS_ERR, _name);
throw new TransformerConfigurationException(err.toString());
}
catch (LinkageError e) {
@@ -359,8 +347,7 @@ public final class TemplatesImpl implements Templates, Serializable {
return translet;
}
catch (InstantiationException e) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_OBJECT_ERR, _name);
- deleteMalformedTransletClassFiles();
+ ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_OBJECT_ERR, _name);
throw new TransformerConfigurationException(err.toString());
}
catch (IllegalAccessException e) {
@@ -368,26 +355,6 @@ public final class TemplatesImpl implements Templates, Serializable {
throw new TransformerConfigurationException(err.toString());
}
}
-
- /*
- * Delete, any malformed translet .class files from file system, that were
- * generated during XSLT transform.
- */
- private void deleteMalformedTransletClassFiles() {
- if (_currTransletFile != null) {
- _currTransletFile.delete();
- }
-
- if (_currTransletAuxfiles != null && _currTransletAuxfiles.length > 0) {
- for (int idx = 0; idx < _currTransletAuxfiles.length; idx++) {
- _currTransletAuxfiles[idx].delete();
- }
- }
-
- if (_currTransletJarfile != null) {
- _currTransletJarfile.delete();
- }
- }
/**
* Implements JAXP's Templates.newTransformer()
@@ -440,4 +407,4 @@ public final class TemplatesImpl implements Templates, Serializable {
public void setStylesheetDOM(DOM sdom) {
_sdom.set(sdom);
}
-}
+}
\ No newline at end of file
diff --git a/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java b/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
index 41f2b1bf..106167bd 100644
--- a/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
+++ b/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
@@ -201,12 +201,6 @@ public class TransformerFactoryImpl
* <p>State of secure processing feature.</p>
*/
private boolean _isSecureProcessing = false;
-
- private File _currTransletFile = null;
-
- private File[] _currTransletAuxfiles = null;
-
- private File _currTransletJarfile = null;
/**
* javax.xml.transform.sax.TransformerFactory implementation.
@@ -740,9 +734,7 @@ public class TransformerFactoryImpl
// after each newTemplates() call.
resetTransientAttributes();
- return new TemplatesImpl(bytecodes, transletClassName, null,
- _indentNumber, this, _currTransletFile,
- _currTransletAuxfiles, _currTransletJarfile);
+ return new TemplatesImpl(bytecodes, transletClassName, null, _indentNumber, this);
}
}
@@ -859,7 +851,7 @@ public class TransformerFactoryImpl
}
return new TemplatesImpl(bytecodes, transletName,
- xsltc.getOutputProperties(), _indentNumber, this, null, null, null);
+ xsltc.getOutputProperties(), _indentNumber, this);
}
/**
@@ -1140,9 +1132,7 @@ public class TransformerFactoryImpl
File transletFile = new File(transletPath);
if (!transletFile.exists())
return null;
-
- _currTransletFile = transletFile;
-
+
// Compare the timestamps of the translet and the xsl file.
// If the translet is older than the xsl file, return null
// so that the xsl file is used for the transformation and
@@ -1224,8 +1214,6 @@ public class TransformerFactoryImpl
}
}
- _currTransletAuxfiles = auxfiles;
-
// Convert the Vector of byte[] to byte[][].
final int count = bytecodes.size();
if ( count > 0) {
@@ -1327,8 +1315,6 @@ public class TransformerFactoryImpl
for (int i = 0; i < count; i++) {
result[i] = (byte[])bytecodes.get(i);
}
-
- _currTransletJarfile = file;
return result;
}
@@ -1424,4 +1410,4 @@ public class TransformerFactoryImpl
protected Class getDTMManagerClass() {
return m_DTMManagerClass;
}
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org