[pkg-java] r18026 - in trunk/jakarta-jmeter/debian: . patches
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Apr 11 15:01:39 UTC 2014
Author: ebourg-guest
Date: 2014-04-11 15:01:39 +0000 (Fri, 11 Apr 2014)
New Revision: 18026
Added:
trunk/jakarta-jmeter/debian/patches/04_java8_compatibility.patch
Modified:
trunk/jakarta-jmeter/debian/changelog
trunk/jakarta-jmeter/debian/patches/series
Log:
Renamed HashTree.replace(Object, Object) to fix the Java 8 compatibility
Modified: trunk/jakarta-jmeter/debian/changelog
===================================================================
--- trunk/jakarta-jmeter/debian/changelog 2014-04-11 13:28:17 UTC (rev 18025)
+++ trunk/jakarta-jmeter/debian/changelog 2014-04-11 15:01:39 UTC (rev 18026)
@@ -1,5 +1,8 @@
jakarta-jmeter (2.8-2) unstable; urgency=low
+ * Renamed the HashTree.replace(Object, Object) method to replaceKey().
+ This avoids a conflict with the new Map.replace(Object, Object) method
+ introduced in Java 8.
* Updated the classpath of jorphan.jar to use Commons Collections 3
* Standards-Version updated to 3.9.5 (no changes)
* Switch to debhelper level 9
Added: trunk/jakarta-jmeter/debian/patches/04_java8_compatibility.patch
===================================================================
--- trunk/jakarta-jmeter/debian/patches/04_java8_compatibility.patch (rev 0)
+++ trunk/jakarta-jmeter/debian/patches/04_java8_compatibility.patch 2014-04-11 15:01:39 UTC (rev 18026)
@@ -0,0 +1,96 @@
+Description: Renames the HashTree.replace(Object, Object) method to replaceKey().
+ This avoids a conflict with the new Map.replace(Object, Object) method
+ introduced in Java 8.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: https://issues.apache.org/bugzilla/show_bug.cgi?id=56360
+--- a/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java
++++ b/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java
+@@ -117,7 +117,7 @@
+
+ /** {@inheritDoc} */
+ @Override
+- public void replace(Object currentKey, Object newKey) {
++ public void replaceKey(Object currentKey, Object newKey) {
+ HashTree tree = getTree(currentKey);
+ data.remove(currentKey);
+ data.put(newKey, tree);
+--- a/src/jorphan/org/apache/jorphan/collections/HashTree.java
++++ b/src/jorphan/org/apache/jorphan/collections/HashTree.java
+@@ -745,7 +745,7 @@
+ * Finds the given current key, and replaces it with the given new key. Any
+ * tree structure found under the original key is moved to the new key.
+ */
+- public void replace(Object currentKey, Object newKey) {
++ public void replaceKey(Object currentKey, Object newKey) {
+ HashTree tree = getTree(currentKey);
+ data.remove(currentKey);
+ data.put(newKey, tree);
+--- a/src/core/org/apache/jmeter/JMeter.java
++++ b/src/core/org/apache/jmeter/JMeter.java
+@@ -851,7 +851,7 @@
+ HashTree replacementTree = rc.getReplacementSubTree();
+ if (replacementTree != null) {
+ convertSubTree(replacementTree);
+- tree.replace(item, rc);
++ tree.replaceKey(item, rc);
+ tree.set(rc, replacementTree);
+ }
+ } else { // null subTree
+@@ -877,14 +877,14 @@
+ HashTree replacementTree = rc.getReplacementSubTree();
+ if (replacementTree != null) {
+ convertSubTree(replacementTree);
+- tree.replace(item, rc);
++ tree.replaceKey(item, rc);
+ tree.set(rc, replacementTree);
+ }
+ }
+ } else { // Not a ReplaceableController
+ convertSubTree(tree.getTree(item));
+ TestElement testElement = item.getTestElement();
+- tree.replace(item, testElement);
++ tree.replaceKey(item, testElement);
+ }
+ } else { // Not enabled
+ tree.remove(item);
+--- a/src/core/org/apache/jmeter/engine/ConvertListeners.java
++++ b/src/core/org/apache/jmeter/engine/ConvertListeners.java
+@@ -62,13 +62,13 @@
+ RemoteSampleListener rtl = new RemoteSampleListenerImpl(item);
+ if (item instanceof TestStateListener && item instanceof SampleListener) { // TL - all
+ RemoteListenerWrapper wrap = new RemoteListenerWrapper(rtl);
+- subTree.replace(item, wrap);
++ subTree.replaceKey(item, wrap);
+ } else if (item instanceof TestStateListener) {
+ RemoteTestListenerWrapper wrap = new RemoteTestListenerWrapper(rtl);
+- subTree.replace(item, wrap);
++ subTree.replaceKey(item, wrap);
+ } else if (item instanceof SampleListener) {
+ RemoteSampleListenerWrapper wrap = new RemoteSampleListenerWrapper(rtl);
+- subTree.replace(item, wrap);
++ subTree.replaceKey(item, wrap);
+ } else {
+ log.warn("Could not replace Remotable item "+item.getClass().getName());
+ }
+--- a/src/core/org/apache/jmeter/gui/action/Save.java
++++ b/src/core/org/apache/jmeter/gui/action/Save.java
+@@ -163,7 +163,7 @@
+ JMeterTreeNode item = (JMeterTreeNode) iter.next();
+ convertSubTree(tree.getTree(item));
+ TestElement testElement = item.getTestElement(); // requires JMeterTreeNode
+- tree.replace(item, testElement);
++ tree.replaceKey(item, testElement);
+ }
+ }
+ }
+--- a/src/reports/org/apache/jmeter/report/gui/action/ReportSave.java
++++ b/src/reports/org/apache/jmeter/report/gui/action/ReportSave.java
+@@ -125,7 +125,7 @@
+ ReportTreeNode item = (ReportTreeNode) iter.next();
+ convertSubTree(tree.getTree(item));
+ TestElement testElement = item.getTestElement();
+- tree.replace(item, testElement);
++ tree.replaceKey(item, testElement);
+ }
+ }
+ }
Modified: trunk/jakarta-jmeter/debian/patches/series
===================================================================
--- trunk/jakarta-jmeter/debian/patches/series 2014-04-11 13:28:17 UTC (rev 18025)
+++ trunk/jakarta-jmeter/debian/patches/series 2014-04-11 15:01:39 UTC (rev 18026)
@@ -1,3 +1,4 @@
01_improve_cli_help.patch
02_disable_components.patch
03_bouncycastle_update.patch
+04_java8_compatibility.patch
More information about the pkg-java-commits
mailing list