You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by di...@apache.org on 2005/09/26 22:24:34 UTC
svn commit: r291731 - in /webservices/wss4j/trunk: build.xml
src/org/apache/ws/security/transform/STRTransform.java
Author: dims
Date: Mon Sep 26 13:24:31 2005
New Revision: 291731
URL: http://svn.apache.org/viewcvs?rev=291731&view=rev
Log:
Get code working in JDK1.3
Modified:
webservices/wss4j/trunk/build.xml
webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java
Modified: webservices/wss4j/trunk/build.xml
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/build.xml?rev=291731&r1=291730&r2=291731&view=diff
==============================================================================
--- webservices/wss4j/trunk/build.xml (original)
+++ webservices/wss4j/trunk/build.xml Mon Sep 26 13:24:31 2005
@@ -235,15 +235,24 @@
<classpath refid="classpath.test"/>
</available>
- <available property="jdk14.present" classname="java.security.cert.CertPath">
- <!-- check whether JDK14 is available -->
- <classpath refid="classpath.test"/>
- </available>
-
- <available property="jdk15.present" classname="java.lang.instrument.Instrumentation">
- <!-- check whether JDK15 is available -->
- <classpath refid="classpath.test"/>
- </available>
+ <condition property="jdk13.present">
+ <equals arg1="${ant.java.version}" arg2="1.3"/>
+ </condition>
+
+ <condition property="jdk14.present">
+ <equals arg1="${ant.java.version}" arg2="1.4"/>
+ </condition>
+
+ <condition property="jdk15.present">
+ <equals arg1="${ant.java.version}" arg2="1.5"/>
+ </condition>
+
+ <condition property="merlin.ok">
+ <or>
+ <equals arg1="${ant.java.version}" arg2="1.4"/>
+ <equals arg1="${ant.java.version}" arg2="1.5"/>
+ </or>
+ </condition>
<available property="bc.present" classname="org.bouncycastle.jce.provider.BouncyCastleProvider">
<!-- check whether BouncyCastle is available -->
@@ -252,6 +261,7 @@
<echo message="--- Flags (Note: If the {property name} is displayed, "/>
<echo message=" then the component is not present)"/>
+ <echo message="jdk13.present=${jdk13.present}"/>
<echo message="jdk14.present=${jdk14.present}"/>
<echo message="jdk15.present=${jdk15.present}"/>
<echo message="bc.present=${bc.present}"/>
@@ -315,8 +325,8 @@
<!-- Compile the java code from ${dir.src} into ${build.classes} -->
<javac srcdir="${dir.src}" destdir="${build.classes}" debug="on">
<classpath refid="classpath.library"/>
- <exclude name="**/Merlin.java" unless="jdk14.present"/>
- <!-- <exclude name="**/sandbox/**/*.java" /> -->
+ <exclude name="**/Merlin.java" unless="merlin.ok"/>
+ <exclude name="**/sandbox/**/*.java" if="jdk13.present" />
</javac>
<!-- Copy Property files -->
<copy todir="${build.classes}">
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java?rev=291731&r1=291730&r2=291731&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java Mon Sep 26 13:24:31 2005
@@ -212,26 +212,27 @@
// start of HACK
StringBuffer bf = new StringBuffer(new String(buf));
+ String bf1 = bf.toString();
/*
* Find start and end of first element <....>, this is the Apex node
*/
- int lt = bf.indexOf("<");
- int gt = bf.indexOf(">");
+ int lt = bf1.indexOf("<");
+ int gt = bf1.indexOf(">");
/*
* Lookup the default namespace
*/
- int idx = bf.indexOf(XMLNS);
+ int idx = bf1.indexOf(XMLNS);
/*
* If none found or if it is outside of this (Apex) element look for
* first blank in, insert default namespace there (this is the
* correct place according to c14n specification)
*/
if (idx < 0 || idx > gt) {
- idx = bf.indexOf(" ");
+ idx = bf1.indexOf(" ");
bf.insert(idx + 1, "xmlns=\"\" ");
+ bf1 = bf.toString();
}
- String bf1 = bf.toString();
if (doDebug) {
log.debug("last result: ");
log.debug(bf1);
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org