[jakarta-jmeter] 36/60: Renamed HashTree.replace(Object, Object) to fix the Java 8 compatibility
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Tue Mar 29 22:43:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository jakarta-jmeter.
commit 0e55b84c0708a8bfd3a3e6446cf79a55fffcf6bd
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Fri Apr 11 15:01:39 2014 +0000
Renamed HashTree.replace(Object, Object) to fix the Java 8 compatibility
---
debian/changelog | 3 +
debian/patches/04_java8_compatibility.patch | 96 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 100 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 14a04ba..aa4f13b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/debian/patches/04_java8_compatibility.patch b/debian/patches/04_java8_compatibility.patch
new file mode 100644
index 0000000..8a7c83f
--- /dev/null
+++ b/debian/patches/04_java8_compatibility.patch
@@ -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);
+ }
+ }
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c7ad54d..60e1098 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
01_improve_cli_help.patch
02_disable_components.patch
03_bouncycastle_update.patch
+04_java8_compatibility.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jakarta-jmeter.git
More information about the pkg-java-commits
mailing list