Revert "tdf#121925 test for URLClassPath.ClassPathURLCheck"
This reverts commit 905c107cde
.
Conflicts:
configure.ac
As discussed at <https://bugs.documentfoundation.org/show_bug.cgi?id=121925#c12>
"Fix Java Jar dependency classpath to pass the ClassPathURLCheck": "At least
with java-latest-openjdk-headless-13.0.0.33-1.rolling.fc31.x86_64, the
testurlcheck program in configure.ac reports 'false', but (when you convert the
corresponding AC_MSG_ERROR into a AC_MSG_RESULT to not make configure fail) a
full `make check screenshot` works fine for me."
Change-Id: I205bada5e8eeede7b33cdbc3f87a629edb8b9872
Reviewed-on: https://gerrit.libreoffice.org/79687
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
52
configure.ac
52
configure.ac
@@ -7565,58 +7565,6 @@ if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
|
||||
fi
|
||||
SOLARINC="$SOLARINC $JAVAINC"
|
||||
|
||||
if test "$ENABLE_JAVA" != "" -a "x" != "x$JAVACOMPILER" && test "$_jdk_ver" -ge 10900; then
|
||||
url_check_unknown=0
|
||||
java_base="testurlcheck"
|
||||
java_src="${java_base}.java"
|
||||
java_cls="${java_base}.class"
|
||||
cat > "${java_src}" <<_ACEOF
|
||||
[import jdk.internal.loader.URLClassPath;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.URL;
|
||||
|
||||
class ${java_base}
|
||||
{
|
||||
public static void main(String args[])
|
||||
{
|
||||
try {
|
||||
URLClassPath cp = new URLClassPath(new URL[0], null);
|
||||
Field field = cp.getClass().getDeclaredField("DISABLE_CP_URL_CHECK");
|
||||
field.setAccessible(true);
|
||||
System.out.println(field.get(cp).toString());
|
||||
} catch(Exception e) {
|
||||
System.out.println("unknown");
|
||||
}
|
||||
}
|
||||
}]
|
||||
_ACEOF
|
||||
AC_MSG_CHECKING([if jdk.net.URLClassPath.ClassPathURLCheck is disabled])
|
||||
java_cmd="$JAVACOMPILER --add-exports java.base/jdk.internal.loader=ALL-UNNAMED ${java_src} 1>&2"
|
||||
AC_TRY_EVAL(java_cmd)
|
||||
if test $? = 0 -a -f "./${java_cls}"; then
|
||||
java_res=`$JAVAINTERPRETER --add-opens java.base/jdk.internal.loader=ALL-UNNAMED ${java_base} 2>/dev/null`
|
||||
if test $? = 0; then
|
||||
case "${java_res}" in
|
||||
true) AC_MSG_RESULT([yes]) ;;
|
||||
false)
|
||||
rm -f "./${java_src}" "./${java_cls}"
|
||||
AC_MSG_ERROR([no - Java unit tests will break!])
|
||||
;;
|
||||
*) url_check_unknown=1 ;;
|
||||
esac
|
||||
else
|
||||
url_check_unknown=1
|
||||
fi
|
||||
else
|
||||
url_check_unknown=1
|
||||
fi
|
||||
if test $url_check_unknown -eq 1; then
|
||||
AC_MSG_RESULT([unknown - assuming yes])
|
||||
add_warning "Unable to find the default value for jdk.net.URLClassPath.ClassPathURLCheck - java tests might fail!"
|
||||
fi
|
||||
rm -f "./${java_src}" "./${java_cls}"
|
||||
fi
|
||||
|
||||
AC_SUBST(JAVACOMPILER)
|
||||
AC_SUBST(JAVADOC)
|
||||
AC_SUBST(JAVAINTERPRETER)
|
||||
|
Reference in New Issue
Block a user