You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2015/12/02 13:23:11 UTC

svn commit: r1717619 - in /jmeter/trunk: ./ lib/ licenses/bin/ res/maven/ src/core/org/apache/jmeter/save/ xdocs/

Author: pmouawad
Date: Wed Dec  2 12:23:11 2015
New Revision: 1717619

URL: http://svn.apache.org/viewvc?rev=1717619&view=rev
Log:
Bug 58679 - Replace the xpp pull parser in xstream with a java6+ standard solution
Bugzilla Id: 58679

Removed:
    jmeter/trunk/licenses/bin/xmlpull-1.1.3.1.txt
    jmeter/trunk/licenses/bin/xpp3-1.1.4c.txt
Modified:
    jmeter/trunk/build.properties
    jmeter/trunk/build.xml
    jmeter/trunk/eclipse.classpath
    jmeter/trunk/lib/aareadme.txt
    jmeter/trunk/res/maven/ApacheJMeter_parent.pom
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/build.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/build.properties?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/build.properties (original)
+++ jmeter/trunk/build.properties Wed Dec  2 12:23:11 2015
@@ -307,17 +307,6 @@ xstream.jar                 = xstream-${
 xstream.loc                 = ${maven2.repo}/com/thoughtworks/xstream/xstream/${xstream.version}
 xstream.md5                 = 4551a29c38f22ed25eaf109eda50ff03
 
-# XMLPull is required by XStream 1.4.x
-xmlpull.version             = 1.1.3.1
-xmlpull.jar                 = xmlpull-${xmlpull.version}.jar
-xmlpull.loc                 = ${maven2.repo}/xmlpull/xmlpull/${xmlpull.version}
-xmlpull.md5                 = cc57dacc720eca721a50e78934b822d2
-
-xpp3.version                = 1.1.4c
-xpp3.jar                    = xpp3_min-${xpp3.version}.jar
-xpp3.loc                    = ${maven2.repo}/xpp3/xpp3_min/${xpp3.version}
-xpp3.md5                    = DCD95BCB84B09897B2B66D4684C040DA
-
 # Xalan can be found at: http://xml.apache.org/xalan-j/
 xalan.version               = 2.7.2
 xalan.jar                   = xalan-${xalan.version}.jar

Modified: jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/build.xml?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/build.xml (original)
+++ jmeter/trunk/build.xml Wed Dec  2 12:23:11 2015
@@ -409,8 +409,6 @@
     <include name="${lib.dir}/${xerces.jar}"/>
     <include name="${lib.dir}/${xml-apis.jar}"/>
     <include name="${lib.dir}/${xmlgraphics-commons.jar}"/>
-    <include name="${lib.dir}/${xmlpull.jar}"/>
-    <include name="${lib.dir}/${xpp3.jar}"/>
     <include name="${lib.dir}/${xstream.jar}"/>
   </patternset>
 
@@ -486,8 +484,6 @@
     <pathelement location="${lib.dir}/${xerces.jar}"/>
     <pathelement location="${lib.dir}/${xml-apis.jar}"/>
     <pathelement location="${lib.dir}/${xmlgraphics-commons.jar}"/>
-    <pathelement location="${lib.dir}/${xmlpull.jar}"/>
-    <pathelement location="${lib.dir}/${xpp3.jar}"/>
     <pathelement location="${lib.dir}/${xstream.jar}"/>
     <!-- Generated jars -->
     <fileset dir="${lib.dir}" includes="jorphan.jar"/>
@@ -2870,8 +2866,6 @@ run JMeter unless all the JMeter jars ar
         <process_jarfile jarname="xerces"/>
         <process_jarfile jarname="xml-apis"/>
         <process_jarfile jarname="xmlgraphics-commons"/>
-        <process_jarfile jarname="xmlpull"/>
-        <process_jarfile jarname="xpp3"/>
         <process_jarfile jarname="xstream"/>
     </target>
 

Modified: jmeter/trunk/eclipse.classpath
URL: http://svn.apache.org/viewvc/jmeter/trunk/eclipse.classpath?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/eclipse.classpath (original)
+++ jmeter/trunk/eclipse.classpath Wed Dec  2 12:23:11 2015
@@ -96,8 +96,6 @@
 	<classpathentry kind="lib" path="lib/xercesImpl-2.11.0.jar"/>
 	<classpathentry kind="lib" path="lib/xml-apis-1.4.01.jar"/>
 	<classpathentry kind="lib" path="lib/xmlgraphics-commons-2.0.1.jar"/>
-	<classpathentry kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
-	<classpathentry kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
 	<classpathentry kind="lib" path="lib/xstream-1.4.8.jar"/>
 	<!-- Needed for build and test -->
 	<classpathentry kind="src" path="test/resources"/>

Modified: jmeter/trunk/lib/aareadme.txt
URL: http://svn.apache.org/viewvc/jmeter/trunk/lib/aareadme.txt?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/lib/aareadme.txt (original)
+++ jmeter/trunk/lib/aareadme.txt Wed Dec  2 12:23:11 2015
@@ -248,18 +248,6 @@ xmlgraphics-commons-2.0.1 (org.apache.xm
 http://xmlgraphics.apache.org/commons/download.html
 - SaveGraphicsService
 
-xmlpull-1.1.3.1
----------------
-http://www.xmlpull.org/impls.shtml
-- xstream
-
-
-xpp3_min-1.1.4c
----------------
-http://x-stream.github.io/download.html
-or
-http://www.extreme.indiana.edu/dist/java-repository/xpp3/distributions/
-- xstream
 
 xstream-1.4.8
 -------------

Modified: jmeter/trunk/res/maven/ApacheJMeter_parent.pom
URL: http://svn.apache.org/viewvc/jmeter/trunk/res/maven/ApacheJMeter_parent.pom?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/res/maven/ApacheJMeter_parent.pom (original)
+++ jmeter/trunk/res/maven/ApacheJMeter_parent.pom Wed Dec  2 12:23:11 2015
@@ -100,9 +100,7 @@ under the License.
       <jtidy.version>r938</jtidy.version>
       <tika-core.version>1.11</tika-core.version>
       <tika-parsers.version>1.11</tika-parsers.version>
-      <xmlpull.version>1.1.3.1</xmlpull.version>
       <xstream.version>1.4.8</xstream.version>
-      <xpp3.version>1.1.4c</xpp3.version>
       <xalan.version>2.7.2</xalan.version>
       <serializer.version>2.7.2</serializer.version>
       <xerces.version>2.11.0</xerces.version>
@@ -332,16 +330,6 @@ under the License.
         <version>${xstream.version}</version>
       </dependency>
       <dependency>
-        <groupId>xmlpull</groupId>
-        <artifactId>xmlpull</artifactId>
-        <version>${xmlpull.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>xpp3</groupId>
-        <artifactId>xpp3_min</artifactId>
-        <version>${xpp3.version}</version>
-      </dependency>
-      <dependency>
         <groupId>xalan</groupId>
         <artifactId>xalan</artifactId>
         <version>${xalan.version}</version>

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Wed Dec  2 12:23:11 2015
@@ -57,7 +57,8 @@ import com.thoughtworks.xstream.converte
 import com.thoughtworks.xstream.converters.DataHolder;
 import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
 import com.thoughtworks.xstream.converters.reflection.ReflectionProvider;
-import com.thoughtworks.xstream.io.xml.XppDriver;
+import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
+import com.thoughtworks.xstream.io.xml.StaxDriver;
 import com.thoughtworks.xstream.mapper.CannotResolveClassException;
 import com.thoughtworks.xstream.mapper.Mapper;
 import com.thoughtworks.xstream.mapper.MapperWrapper;
@@ -80,7 +81,7 @@ public class SaveService {
 
     private static final class XStreamWrapper extends XStream {
         private XStreamWrapper(ReflectionProvider reflectionProvider) {
-            super(reflectionProvider);
+            super(reflectionProvider, new StaxDriver());
         }
 
         // Override wrapMapper in order to insert the Wrapper in the chain
@@ -334,7 +335,7 @@ public class SaveService {
         // Use deprecated method, to avoid duplicating code
         ScriptWrapper wrapper = new ScriptWrapper();
         wrapper.testPlan = tree;
-        JMXSAVER.toXML(wrapper, outputStreamWriter);
+        JMXSAVER.marshal(wrapper, new PrettyPrintWriter(outputStreamWriter));
         outputStreamWriter.write('\n');// Ensure terminated properly
         outputStreamWriter.close();
     }
@@ -345,7 +346,7 @@ public class SaveService {
         OutputStreamWriter outputStreamWriter = getOutputStreamWriter(out);
         writeXmlHeader(outputStreamWriter);
         // Use deprecated method, to avoid duplicating code
-        JMXSAVER.toXML(el, outputStreamWriter);
+        JMXSAVER.marshal(el, new PrettyPrintWriter(outputStreamWriter));
         outputStreamWriter.close();
     }
 
@@ -373,7 +374,7 @@ public class SaveService {
         // This is effectively the same as saver.toXML(Object, Writer) except we get to provide the DataHolder
         // Don't know why there is no method for this in the XStream class
         try {
-            JTLSAVER.marshal(evt.getResult(), new XppDriver().createWriter(writer), dh);
+            JTLSAVER.marshal(evt.getResult(), new PrettyPrintWriter(writer), dh);
         } catch(RuntimeException e) {
             throw new IllegalArgumentException("Failed marshalling:"+(evt.getResult() != null ? showDebuggingInfo(evt.getResult()) : "null"), e);
         }
@@ -501,7 +502,7 @@ public class SaveService {
         dh.put(RESULTCOLLECTOR_HELPER_OBJECT, resultCollectorHelper); // Allow TestResultWrapper to feed back the samples
         // This is effectively the same as saver.fromXML(InputStream) except we get to provide the DataHolder
         // Don't know why there is no method for this in the XStream class
-        JTLSAVER.unmarshal(new XppDriver().createReader(reader), null, dh);
+        JTLSAVER.unmarshal(new StaxDriver().createReader(reader), null, dh);
         inputStreamReader.close();
     }
 

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1717619&r1=1717618&r2=1717619&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Dec  2 12:23:11 2015
@@ -137,6 +137,7 @@ Summary
 <li><bug>58465</bug>JMS Read response field is badly named and documented</li>
 <li><bug>58601</bug>Change check for modification of <code>saveservice.properties</code> from <code>$Revision$</code> to sha1 sum of the file itself.</li>
 <li><bug>58677</bug>TestSaveService#testLoadAndSave use the wrong set of files. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
+<li><bug>58679</bug>Replace the xpp pull parser in xstream with a java6+ standard solution. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
 </ul>
 <ch_section>Non-functional changes</ch_section>
 <ul>