JDK-8071125 : Improve exception messages in URLPermission
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 8u25
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-01-21
  • Updated: 2016-07-21
  • Resolved: 2016-04-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u102Fixed 9 b116Fixed
Description
One of CAP member's customer receive the follow error after an update to Java 
8u25 and 8u31 on a citrix  terminal server.  However, they have a problem to 
reproduce it. 

 CAP member ask if it is possible to improve the exception and add the 
invalid actions strings to the exception?


Check the screenshot and error message with  Java 1.8.25 und 1.8.31.

java.lang.IllegalArgumentException: invalid actions string
            at java.net.URLPermission.init(Unknown Source)
            at java.net.URLPermission.<init>(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
            at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
            at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
            at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
            at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
            at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
            at com.sun.deploy.cache.DeployCacheHandler.get(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.AccessController.doPrivileged(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.AccessController.doPrivileged(Unknown Source)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
            at sun.security.provider.certpath.URICertStore.engineGetCRLs(Unknown Source)
            at java.security.cert.CertStore.getCRLs(Unknown Source)
            at sun.security.provider.certpath.DistributionPointFetcher.getCRL(Unknown Source)
            at sun.security.provider.certpath.DistributionPointFetcher.getCRLs(Unknown Source)
            at sun.security.provider.certpath.DistributionPointFetcher.getCRLs(Unknown Source)
            at sun.security.provider.certpath.DistributionPointFetcher.getCRLs(Unknown Source)
            at com.sun.deploy.security.RevocationChecker.checkCRLs(Unknown Source)
            at com.sun.deploy.security.RevocationChecker.check(Unknown Source)
            at com.sun.deploy.security.TrustDecider.checkRevocationStatus(Unknown Source)
            at com.sun.deploy.security.TrustDecider.getValidationState(Unknown Source)
            at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
            at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
            at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
            at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
            at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
            at 
com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(
Unknown Source)
            at 
com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown 
Source)
            at 
com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown 
Source)
            at 
com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at 
com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown 
Source)
            at 
com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
            at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown 
Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown 
Source)
            at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown 
Source)
            at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown 
Source)
            at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
            at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown 
Source)
            at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown 
Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown 
Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown 
Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown 
Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown 
Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown 
Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
            at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown 
Source)
            at 
sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)


Comments
"java.lang.IllegalArgumentException: invalid actions string" - certainly makes sense to improve such messages. Unless there's a good reason, we should be printing the string that's causing issue. From a supportability point of view, every IllegalArgumentException throw should be examined for better messaging.
03-02-2015