Jtreg test TestAESWithProviderChange fails after 8u222:
Error messages:
----------System.err:(1150/75850)----------
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.util")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:886)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
at java.lang.ClassLoader$1.run(ClassLoader.java:496)
at java.lang.ClassLoader$1.run(ClassLoader.java:494)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:494)
at com.sun.crypto.provider.ElectronicCodeBook.encrypt(ElectronicCodeBook.java:116)
at com.sun.crypto.provider.CipherCore.update(CipherCore.java:785)
at com.sun.crypto.provider.AESCipher.engineUpdate(AESCipher.java:410)
at javax.crypto.Cipher.update(Cipher.java:1944)
at Dynamic.runTest(Dynamic.java:150)
at Dynamic.runAllTest(Dynamic.java:89)
at Dynamic.run(Dynamic.java:59)
at TestAESWithProviderChange.main(TestAESWithProviderChange.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
at java.lang.Thread.run(Thread.java:748)
......
Jtreg test TestAESWithRemoveAddProvide has simillar issues.
We found it passes after reverting this commit: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/0da125166b2b