mirror of https://github.com/apache/lucene.git
LUCENE-4582: Disable forbidden-APIs checker in JDK 8, upgrade to ASM 4.1.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1416011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6b3aa4054
commit
1e09024af5
|
@ -26,7 +26,7 @@
|
|||
|
||||
<path id="classpath">
|
||||
<fileset dir="lib">
|
||||
<include name="asm-debug-all-4.0.jar"/>
|
||||
<include name="asm-debug-all-4.1.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<taskdef resource="lucene-solr.antlib.xml">
|
||||
<classpath>
|
||||
<pathelement location="${custom-tasks.dir}/../build/tools/classes/java" />
|
||||
<fileset dir="${custom-tasks.dir}/lib" includes="asm-debug-all-4.0.jar" />
|
||||
<fileset dir="${custom-tasks.dir}/lib" includes="asm-debug-all-4.1.jar" />
|
||||
</classpath>
|
||||
</taskdef>
|
||||
<property name="custom-tasks.loaded" value="true"/>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
We use the asm-debug-all library, as the as-all has no generics.
|
||||
It's not really debug, just not "stripped":
|
||||
-->
|
||||
<dependency org="org.ow2.asm" name="asm-debug-all" rev="4.0" transitive="false"/>
|
||||
<dependency org="org.ow2.asm" name="asm-debug-all" rev="4.1" transitive="false"/>
|
||||
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
|
@ -315,6 +315,16 @@ public class ForbiddenApisCheckTask extends Task {
|
|||
|
||||
@Override
|
||||
public void execute() throws BuildException {
|
||||
// the checker is not compatible with JDK 1.8+ (changed class format: 52.0), don't fail just report warning:
|
||||
try {
|
||||
Collections.class.getMethod("emptySortedSet");
|
||||
// this is Java 8 :(
|
||||
log("Java 8 or later is currently not supported by this checker. Please run the checks with a previous JDK!", Project.MSG_WARN);
|
||||
return;
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
// ignore, we are fine!
|
||||
}
|
||||
|
||||
AntClassLoader antLoader = null;
|
||||
try {
|
||||
if (classpath != null) {
|
||||
|
|
Loading…
Reference in New Issue