Fix JDK7 compatibility broken in cassandra-2.2

Patch by Ted Petersson; Reviewed by Michael Shuler for CASSANDRA-15050
This commit is contained in:
Ted Petersson 2019-06-06 11:12:52 -05:00 committed by Michael Shuler
parent 63ff65a8dd
commit a9a4f171be
3 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,5 @@
2.2.15
* Fix JDK7 compatibility broken in cassandra-2.2 (CASSANDRA-15050)
* Support cross version messaging in in-jvm upgrade dtests (CASSANDRA-15078)
* Fix index summary redistribution cancellation (CASSANDRA-15045)
* Refactor Circle CI configuration (CASSANDRA-14806)

View File

@ -71,9 +71,9 @@
<property name="dist.dir" value="${build.dir}/dist"/>
<property name="tmp.dir" value="${java.io.tmpdir}"/>
<property name="source.version" value="1.7"/>
<property name="source.version" value="1.8"/>
<property name="source.test.version" value="1.8"/>
<property name="target.version" value="1.7"/>
<property name="target.version" value="1.8"/>
<property name="target.test.version" value="1.8"/>
<condition property="version" value="${base.version}">

View File

@ -19,7 +19,6 @@
package org.apache.cassandra.utils;
import java.lang.management.ManagementFactory;
import java.util.function.Consumer;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
@ -206,4 +205,10 @@ public interface MBeanWrapper
this.handler = handler;
}
}
// Locally defined Consumer interface, to be compatible with Java 7. Only needed for cassandra-2.2
interface Consumer<T>
{
void accept(T e);
}
}