Add GROOVY_TURN_OFF_JAVA_WARNINGS to control whether show warnings from Java9


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/f722d110
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/f722d110
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/f722d110

Branch: refs/heads/GROOVY_2_5_X
Commit: f722d110a481de23ee3144d6773ae118c92dd9c3
Parents: d500493
Author: sunlan <sun...@apache.org>
Authored: Sat Sep 30 00:03:37 2017 +0800
Committer: Paul King <pa...@asert.com.au>
Committed: Thu Jul 12 22:42:18 2018 +1000

----------------------------------------------------------------------
 src/bin/startGroovy     | 2 +-
 src/bin/startGroovy.bat | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/f722d110/src/bin/startGroovy
----------------------------------------------------------------------
diff --git a/src/bin/startGroovy b/src/bin/startGroovy
index dd3eb14..7d25fb5 100644
--- a/src/bin/startGroovy
+++ b/src/bin/startGroovy
@@ -282,7 +282,7 @@ startGroovy ( ) {
     if [ "$JAVA_VERSION" \> "1.8.0" ]; then
                ADD_MODULES_OPT="--add-modules"
                [ "${JAVA_OPTS#*$ADD_MODULES_OPT}" = "$JAVA_OPTS" ] && 
JAVA_OPTS="$JAVA_OPTS $ADD_MODULES_OPT ALL-SYSTEM"
-               JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.annotation=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.lang.module=ALL-UNNAMED 
--add-opens=java.base/java.lang.ref=ALL-UNNAMED 
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens=java.base/java.math=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.net.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.file=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED 
--add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.se
 curity.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED 
--add-opens=java.base/java.security.interfaces=ALL-UNNAMED 
--add-opens=java.base/java.security.spec=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED 
--add-opens=java.base/java.text.spi=ALL-UNNAMED 
--add-opens=java.base/java.time=ALL-UNNAMED 
--add-opens=java.base/java.time.chrono=ALL-UNNAMED 
--add-opens=java.base/java.time.format=ALL-UNNAMED 
--add-opens=java.base/java.time.temporal=ALL-UNNAMED 
--add-opens=java.base/java.time.zone=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED 
--add-opens=java.base/java.util.function=ALL-UNNAMED 
--add-opens=java.base/java.util.jar=ALL-UNNAMED 
--add-opens=java.base/java.util.regex=ALL-UNNAMED 
--add-opens=java.base/java.util.spi=ALL-UNNAMED 
--add-opens=java.base/java.util.stream=ALL-UNNAM
 ED --add-opens=java.base/java.util.zip=ALL-UNNAMED 
--add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED 
--add-opens=java.desktop/java.applet=ALL-UNNAMED 
--add-opens=java.desktop/java.awt=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.color=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.print=ALL-UNNAMED 
--add-opens=java.desktop/java.beans=ALL-UNNAMED 
--add-opens=java.desktop/java.beans.beancontext=ALL-UN
 NAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED 
--add-opens=java.logging/java.util.logging=ALL-UNNAMED 
--add-opens=java.management/java.lang.management=ALL-UNNAMED 
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.server=ALL-UNNAMED 
--add-opens=java.sql/java.sql=ALL-UNNAMED"
+               [ "$GROOVY_TURN_OFF_JAVA_WARNINGS" = "true" ] &&       
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.annotation=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.lang.module=ALL-UNNAMED 
--add-opens=java.base/java.lang.ref=ALL-UNNAMED 
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens=java.base/java.math=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.net.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.file=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/
 java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED 
--add-opens=java.base/java.security.cert=ALL-UNNAMED 
--add-opens=java.base/java.security.interfaces=ALL-UNNAMED 
--add-opens=java.base/java.security.spec=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED 
--add-opens=java.base/java.text.spi=ALL-UNNAMED 
--add-opens=java.base/java.time=ALL-UNNAMED 
--add-opens=java.base/java.time.chrono=ALL-UNNAMED 
--add-opens=java.base/java.time.format=ALL-UNNAMED 
--add-opens=java.base/java.time.temporal=ALL-UNNAMED 
--add-opens=java.base/java.time.zone=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED 
--add-opens=java.base/java.util.function=ALL-UNNAMED 
--add-opens=java.base/java.util.jar=ALL-UNNAMED 
--add-opens=java.base/java.util.regex=ALL-UNNAMED 
--add-opens=java.base/java.util.spi=ALL-U
 NNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED 
--add-opens=java.base/java.util.zip=ALL-UNNAMED 
--add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED 
--add-opens=java.desktop/java.applet=ALL-UNNAMED 
--add-opens=java.desktop/java.awt=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.color=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.print=ALL-UNNAMED 
--add-opens=java.desktop/java.beans=ALL-UNNAMED
  --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED 
--add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED 
--add-opens=java.logging/java.util.logging=ALL-UNNAMED 
--add-opens=java.management/java.lang.management=ALL-UNNAMED 
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.server=ALL-UNNAMED 
--add-opens=java.sql/java.sql=ALL-UNNAMED"
     fi
 
     CLASS=$1

http://git-wip-us.apache.org/repos/asf/groovy/blob/f722d110/src/bin/startGroovy.bat
----------------------------------------------------------------------
diff --git a/src/bin/startGroovy.bat b/src/bin/startGroovy.bat
index 480234b..d3c8174 100644
--- a/src/bin/startGroovy.bat
+++ b/src/bin/startGroovy.bat
@@ -273,7 +273,7 @@ for /f "useback tokens=*" %%a in ('%JAVA_VERSION%') do set 
JAVA_VERSION=%%~a
 set JAVA_VERSION=%JAVA_VERSION:~0,5%
 set ADD_MODULES_OPT=--add-modules
 if "%JAVA_VERSION%" gtr "1.8.0" echo.%JAVA_OPTS% | findstr 
/C:"%ADD_MODULES_OPT%" >nul 2>&1 || set JAVA_OPTS=%JAVA_OPTS% %ADD_MODULES_OPT% 
ALL-SYSTEM
-set JAVA_OPTS=%JAVA_OPTS% --add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.annotation=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.lang.module=ALL-UNNAMED 
--add-opens=java.base/java.lang.ref=ALL-UNNAMED 
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens=java.base/java.math=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.net.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.file=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED 
--add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.secu
 rity.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED 
--add-opens=java.base/java.security.interfaces=ALL-UNNAMED 
--add-opens=java.base/java.security.spec=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED 
--add-opens=java.base/java.text.spi=ALL-UNNAMED 
--add-opens=java.base/java.time=ALL-UNNAMED 
--add-opens=java.base/java.time.chrono=ALL-UNNAMED 
--add-opens=java.base/java.time.format=ALL-UNNAMED 
--add-opens=java.base/java.time.temporal=ALL-UNNAMED 
--add-opens=java.base/java.time.zone=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED 
--add-opens=java.base/java.util.function=ALL-UNNAMED 
--add-opens=java.base/java.util.jar=ALL-UNNAMED 
--add-opens=java.base/java.util.regex=ALL-UNNAMED 
--add-opens=java.base/java.util.spi=ALL-UNNAMED 
--add-opens=java.base/java.util.stream=ALL-UNNAMED
  --add-opens=java.base/java.util.zip=ALL-UNNAMED 
--add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED 
--add-opens=java.desktop/java.applet=ALL-UNNAMED 
--add-opens=java.desktop/java.awt=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.color=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.print=ALL-UNNAMED 
--add-opens=java.desktop/java.beans=ALL-UNNAMED 
--add-opens=java.desktop/java.beans.beancontext=ALL-UNNA
 MED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED 
--add-opens=java.logging/java.util.logging=ALL-UNNAMED 
--add-opens=java.management/java.lang.management=ALL-UNNAMED 
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.server=ALL-UNNAMED 
--add-opens=java.sql/java.sql=ALL-UNNAMED
+if "%JAVA_VERSION%" gtr "1.8.0" if "%GROOVY_TURN_OFF_JAVA_WARNINGS%" == "true" 
                set JAVA_OPTS=%JAVA_OPTS% 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.annotation=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.lang.module=ALL-UNNAMED 
--add-opens=java.base/java.lang.ref=ALL-UNNAMED 
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens=java.base/java.math=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.net.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset=ALL-UNNAMED 
--add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED 
--add-opens=java.base/java.nio.file=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED 
--add-opens=java.base/java.nio.file.
 spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED 
--add-opens=java.base/java.security.acl=ALL-UNNAMED 
--add-opens=java.base/java.security.cert=ALL-UNNAMED 
--add-opens=java.base/java.security.interfaces=ALL-UNNAMED 
--add-opens=java.base/java.security.spec=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED 
--add-opens=java.base/java.text.spi=ALL-UNNAMED 
--add-opens=java.base/java.time=ALL-UNNAMED 
--add-opens=java.base/java.time.chrono=ALL-UNNAMED 
--add-opens=java.base/java.time.format=ALL-UNNAMED 
--add-opens=java.base/java.time.temporal=ALL-UNNAMED 
--add-opens=java.base/java.time.zone=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED 
--add-opens=java.base/java.util.function=ALL-UNNAMED 
--add-opens=java.base/java.util.jar=ALL-UNNAMED 
--add-opens=java.base/java.util.regex=ALL-UNNAMED --a
 dd-opens=java.base/java.util.spi=ALL-UNNAMED 
--add-opens=java.base/java.util.stream=ALL-UNNAMED 
--add-opens=java.base/java.util.zip=ALL-UNNAMED 
--add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED 
--add-opens=java.desktop/java.applet=ALL-UNNAMED 
--add-opens=java.desktop/java.awt=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.color=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED 
--add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-ope
 ns=java.desktop/java.beans=ALL-UNNAMED 
--add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED 
--add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED 
--add-opens=java.logging/java.util.logging=ALL-UNNAMED 
--add-opens=java.management/java.lang.management=ALL-UNNAMED 
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED 
--add-opens=java.rmi/java.rmi.server=ALL-UNNAMED 
--add-opens=java.sql/java.sql=ALL-UNNAMED
 
 if exist "%USERPROFILE%/.groovy/postinit.bat" call 
"%USERPROFILE%/.groovy/postinit.bat"
 

Reply via email to