RFR [9] 8075139: Restore java.protocol.handler.pkgs to work as a fallback for migration
Chris Hegarty
chris.hegarty at oracle.com
Tue Apr 21 10:20:05 UTC 2015
On 15 Apr 2015, at 16:43, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> On Apr 15, 2015, at 4:35 PM, Chris Hegarty <chris.hegarty at oracle.com> wrote:
>>>
>>> I marginally prefer using flatMap rather than map/filter e.g. change getHandler to return Stream< URLStreamHandler> and change the last line to be "return Stream.ofNullable(handle). Up to you.
>>
>> That's better. For completeness, the updated webrev:
>> http://cr.openjdk.java.net/~chegar/8075139/webrev.03/
Argh! The launcher is now falling over with "Error occurred during initialization of VM”, in cases where a custom policy file contains a URL [*].
I’ll revert back to the version pre streams and lambda.
http://cr.openjdk.java.net/~chegar/8075139/webrev.01/
-Chris.
[*] Error occurred during initialization of VM
java.lang.NoClassDefFoundError: Could not initialize class java.lang.invoke.LambdaForm
at java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(DirectMethodHandle.java:223)
at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:188)
at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:177)
at java.lang.invoke.DirectMethodHandle.make(DirectMethodHandle.java:84)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1656)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:1613)
at java.lang.invoke.MethodHandles$Lookup.getDirectMethodForConstant(MethodHandles.java:1798)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1747)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:477)
at java.net.URL.lookupViaProperty(URL.java:1185)
at java.net.URL.getURLStreamHandler(URL.java:1309)
at java.net.URL.<init>(URL.java:615)
at java.net.URL.<init>(URL.java:506)
at java.net.URL.<init>(URL.java:455)
at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:210)
at javax.crypto.SecretKeyFactory.nextSpi(SecretKeyFactory.java:295)
at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)
at sun.security.pkcs12.PKCS12KeyStore.getPBEKey(PKCS12KeyStore.java:815)
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2013)
at java.security.KeyStore.load(KeyStore.java:1459)
at sun.security.util.PolicyUtil.getKeyStore(PolicyUtil.java:166)
at sun.security.provider.PolicyFile.init(PolicyFile.java:610)
at sun.security.provider.PolicyFile.access$400(PolicyFile.java:258)
at sun.security.provider.PolicyFile$3.run(PolicyFile.java:521)
at sun.security.provider.PolicyFile$3.run(PolicyFile.java:495)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.provider.PolicyFile.initPolicyFile(PolicyFile.java:495)
at sun.security.provider.PolicyFile.initPolicyFile(PolicyFile.java:480)
at sun.security.provider.PolicyFile.init(PolicyFile.java:439)
at sun.security.provider.PolicyFile.<init>(PolicyFile.java:297)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:425)
at java.lang.Class.newInstance(Class.java:464)
at java.security.Policy.getPolicyNoCheck(Policy.java:184)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:278)
at java.lang.System$1.run(System.java:315)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.System.setSecurityManager0(System.java:312)
at java.lang.System.setSecurityManager(System.java:290)
at sun.misc.Launcher.<init>(Launcher.java:109)
at sun.misc.Launcher.<clinit>(Launcher.java:64)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1443)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1428)
More information about the net-dev
mailing list