Streamline E4 CSS Core and E4 CSS SWT and remove URI re-implementation#4011
Streamline E4 CSS Core and E4 CSS SWT and remove URI re-implementation#4011HannesWell wants to merge 1 commit into
Conversation
|
Nice cleanup, deleting ~3000 lines of vendored EMF URI is a clear win. Two small things worth tightening on the java.net.URI swap:
Maybe wait for the next release which such a change? I also have huge CSS branch for cleanup (IIRC removes 20 000 - 30 000 lines of code) for the next release pilled up. |
|
Wow, a copy of URI. What a bad idea. It's a copy before URI was ultra-performance-tuned. And this in the context of e4 where the model uses EMF anyway. Sigh. Of course every time we convert something to use java.net.URI we have "fun" new problems, so probably @vogella's warning is a good one. |
9b6a055 to
0fe9266
Compare
As far as I understand the code, an ArrayIndexOutOfBounds exception would be thrown if the path was empty with the old implementation? It was only checked if
Yes, that's reasonable.
Yes, absolutely. That was my intention from the beginning.
Yes. I can only speculate why. Additionally the URI implementation also caches URI instances. Which is good if many URI objects are long living. But here it's only used temporarily and therefore I don't think caching saves more than it costs. |
Replace the copy of
org.eclipse.emf.common.util.URIthe default Javajava.net.URI.A noticable main difference between both, except for some different APIs, is that the EMF URI does not require the URI spec to be encoded while
java.net.URIhas this requirement.But since for example OSGi bundle names also only support a limited set of characters (see https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#framework.module.bsn), I assume we can expect that encoding is never necessary.
@merks what do you think?