paulrutter commented on PR #552:
URL: https://github.com/apache/felix-dev/pull/552#issuecomment-5531912431

   Also did the `Unsafe` cleanup I had left over: 
[`33cf2ff`](https://github.com/apache/felix-dev/commit/33cf2ff539).
   
   With plurl installing the JVM factories, `URLHandlers` is never instantiated 
— its private constructor was the only caller of the reflective field clearing. 
Everything reachable only from there was dead, including the whole 
cross-classloader rendezvous it existed to support 
(`registerFrameworkListsForContextSearch` published the framework list to a 
`URLHandlers` in another classloader, which plurl now does properly). The class 
keeps only the framework registry that `URLHandlersBundleStreamHandler` needs 
to find the owner of a caller when a handler isn't bound to one. `SecureAction` 
loses `swapStaticFieldIfNotClass` and `flush`, which had no callers left. Net 
−794 lines.
   
   That removes every reflective write to a `java.net` static field. To be 
complete: one `sun.misc.Unsafe` use remains, in `SecureAction.getAccessor`. 
It's a different concern — the `setAccessible` strategy for deep reflection, 
still needed by `addURLToURLClassLoader` when installing framework extension 
bundles — so I left it alone rather than fold an unrelated change in here.
   
   Suite is at the pre-existing baseline.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to