On 13.02.2020 11:46, Konrad Windszus wrote:
So what you are saying is basically that the part inside the {} must contain at least 
one InvalidChar 
(https://docs.adobe.com/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.2%20Names 
<https://docs.adobe.com/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.2 
Names>) to make Jackrabbit/Oak detect it as a expanded name?

Yes, that's how it's supposed to work.

Why was the default namespace URI then defined as the empty string? That sounds 
like a mistake to me.

That dates back way before JCR 2.0 (I also happen to disagree what the
default NS name should be anything except "").

Currently I cannot even do NameParser.parse() 
(https://github.com/apache/jackrabbit/blob/b23d6734381e49f236c3705820126803555608b5/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java#L53
 
<https://github.com/apache/jackrabbit/blob/b23d6734381e49f236c3705820126803555608b5/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java#L53>)
 for name = "wrongtype".
It throws an IllegalArgumentException:

java.lang.IllegalArgumentException: No namespaceURI specified
        at 
org.apache.jackrabbit.spi.commons.name.NameFactoryImpl.create(NameFactoryImpl.java:49)
        at 
org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:191)

with jackrabbit-spi-commons 2.20.0.

"wrongtype" is IMHO a totally valid qualified name, therefore it shouldn't 
throw!
Is this a bug?

It might, but I doubt it.

Note that jackrabbit-spi-commons is a collection of classes used by the
*internal* Jackrabbit Service Provider interface (which, FWIW, never has
been completed for JCR 2.0).

From where are you using these classes?

Best regards, Julian

Reply via email to