Suppress 'loadImage called with unusual URI: ergoloc:/...' log message#8917
Suppress 'loadImage called with unusual URI: ergoloc:/...' log message#8917eirikbakke merged 1 commit intoapache:masterfrom
Conversation
…oloc:/...', and add some comments about this URL scheme.
mbien
left a comment
There was a problem hiding this comment.
thanks! makes sense. (haven't tested it)
|
Post merge approval! 😄 Thanks. Notes make sense - at some point we need to look at all the icons in the ergonomics module and how they're generated / included, should include any SVGs, etc. |
|
Actually, I'm not sure this is the right approach? @jtulach ? Looking at https://github.com/apache/netbeans/blob/master/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FoDURLStreamHandler.java#L44 this just delegates to A bit ugly that the platform needs to know about |
|
I don't quite understand what the ergoloc scheme is used for, or how the "ergoloc:/org/netbeans/modules/ide/ergonomics/enterprise/org-netbeans-modules-websvc-core-client-resources-ws_client_16.png" URL arose in the first place; it doesn't point to a valid image, and it comes from a layer attribute that was auto-generated by an ant script somewhere. Reading through FoDURLStreamHandler it could appear that ergoloc is really only meant to be used for HTML files? Or not... So anyway, the current PR just maintains the status quo for ergoloc URLs, and suppresses the warning. |
|
Have you looked inside the compiled ergonomics module JAR? That file is in there as far as I can see, as are many icons. EDIT : this fix is great for NB28 though. It might be better to look at ergonomics generation in that module, and only route URLs through that protocol that really need to be in future? |
The ImageUtilities.loadImage(URL) method was added earlier to help migrate Toolkit.getImage(URL) calls to ImageUtilities-based loading (to support SVG icons etc.).
As mentioned here, there are occasionally icon loading attempts with the special URL scheme "ergoloc", which caused some warnings in the IDE log.
This PR suppresses said warning messages, while adding a softer INFO log entry for a more specific case that we have yet to observe.