[jira] [Comment Edited] (OAK-10523) Basic SNS support returns invalid node names

2023-10-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-10523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781413#comment-17781413
 ] 

Julian Reschke edited comment on OAK-10523 at 10/31/23 3:04 PM:


Well, Oak doesn't throw the exception on read.

The exception happens inside jackrabbit-spi-commons' name parser, and that does 
exactly what it's documented to do (note that unless I'm missing something, Oak 
doesn't use that parser; it's only used in Jackrabbit and Filevault).

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square brackets will always fail.

What we can do is improve the diagnostics in case these brackets made it into 
an Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, 
but only a little: export using FV would work, but then you'd end up with a 
package that can not be imported. Unless we add support in FV to rename these 
nodes (similar to what - IMHO - oak-upgrade does).




was (Author: reschke):
Well, Oak doesn't throw the exception on read.

The exception happens inside jackrabbit-spi-commons' name parser, and that does 
exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square brackets will always fail.

What we can do is improve the diagnostics in case these brackets made it into 
an Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, 
but only a little: export using FV would work, but then you'd end up with a 
package that can not be imported. Unless we add support in FV to rename these 
nodes (similar to what - IMHO - oak-upgrade does).



> Basic SNS support returns invalid node names
> 
>
> Key: OAK-10523
> URL: https://issues.apache.org/jira/browse/OAK-10523
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>Priority: Minor
>
> When encountering names using index notation in storage, oak-jcr treats the 
> index suffix as part of the name. This causes issues with other components 
> that assume that the result of {{Node.getName()}} is indeed a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (OAK-10523) Basic SNS support returns invalid node names

2023-10-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-10523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781413#comment-17781413
 ] 

Julian Reschke edited comment on OAK-10523 at 10/31/23 3:02 PM:


Well, Oak doesn't throw the exception on read.

The exception happens inside jackrabbit-spi-commons' name parser, and that does 
exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square brackets will always fail.

What we can do is improve the diagnostics in case these brackets made it into 
an Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, 
but only a little: export using FV would work, but then you'd end up with a 
package that can not be imported. Unless we add support in FV to rename these 
nodes (similar to what - IMHO - oak-upgrade does).




was (Author: reschke):
Well, Oak doesn't throw the exception on read.

The exception happens inside jackrabbit-spi-commons' name parser, and that does 
exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square braces will always fail.

What we can do is improve the diagnostics in case these braces made it into an 
Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, but 
only a little: export using FV would work, but then you'd end up with a package 
that can not be imported. Unless we add support in FV to rename these nodes 
(similar to what - IMHO - oak-upgrade does).



> Basic SNS support returns invalid node names
> 
>
> Key: OAK-10523
> URL: https://issues.apache.org/jira/browse/OAK-10523
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>Priority: Minor
>
> When encountering names using index notation in storage, oak-jcr treats the 
> index suffix as part of the name. This causes issues with other components 
> that assume that the result of {{Node.getName()}} is indeed a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (OAK-10523) Basic SNS support returns invalid node names

2023-10-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-10523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781413#comment-17781413
 ] 

Julian Reschke edited comment on OAK-10523 at 10/31/23 3:01 PM:


Well, Oak doesn't throw the exception on read.

The exception happens inside jackrabbit-spi-commons' name parser, and that does 
exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square braces will always fail.

What we can do is improve the diagnostics in case these braces made it into an 
Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, but 
only a little: export using FV would work, but then you'd end up with a package 
that can not be imported. Unless we add support in FV to rename these nodes 
(similar to what - IMHO - oak-upgrade does).




was (Author: reschke):
Well, Oak doesn't throw the exception on read.

jackrabbit-spi-commons' name parser does exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square braces will always fail.

What we can do is improve the diagnostics in case these braces made it into an 
Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, but 
only a little: export using FV would work, but then you'd end up with a package 
that can not be imported. Unless we add support in FV to rename these nodes 
(similar to what - IMHO - oak-upgrade does).



> Basic SNS support returns invalid node names
> 
>
> Key: OAK-10523
> URL: https://issues.apache.org/jira/browse/OAK-10523
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>Priority: Minor
>
> When encountering names using index notation in storage, oak-jcr treats the 
> index suffix as part of the name. This causes issues with other components 
> that assume that the result of {{Node.getName()}} is indeed a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (OAK-10523) Basic SNS support returns invalid node names

2023-10-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-10523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781413#comment-17781413
 ] 

Julian Reschke edited comment on OAK-10523 at 10/31/23 3:00 PM:


Well, Oak doesn't throw the exception on read.

jackrabbit-spi-commons' name parser does exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square braces will always fail.

What we can do is improve the diagnostics in case these braces made it into an 
Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, but 
only a little: export using FV would work, but then you'd end up with a package 
that can not be imported. Unless we add support in FV to rename these nodes 
(similar to what - IMHO - oak-upgrade does).




was (Author: reschke):
Well, Oak doesn't throw the exception.

jackrabbit-spi-commons' name parser does exactly what it's documented to do.

Maybe we need to understand first what the goal is. Unless I'm missing 
something, we aren't planning to support SNS properly in Oak. Thus, creating a 
node with a name (not JCR name) including square braces will always fail.

What we can do is improve the diagnostics in case these braces made it into an 
Oak repo (see JCRVLT-724 and JCR-4983). Fixing OAK-10523 would also help, but 
only a little: export using FV would work, but then you'd end up with a package 
that can not be imported. Unless we add support in FV to rename these nodes 
(similar to what - IMHO - oak-upgrade does).



> Basic SNS support returns invalid node names
> 
>
> Key: OAK-10523
> URL: https://issues.apache.org/jira/browse/OAK-10523
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>Priority: Minor
>
> When encountering names using index notation in storage, oak-jcr treats the 
> index suffix as part of the name. This causes issues with other components 
> that assume that the result of {{Node.getName()}} is indeed a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (OAK-10523) Basic SNS support returns invalid node names

2023-10-31 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-10523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781411#comment-17781411
 ] 

Konrad Windszus edited comment on OAK-10523 at 10/31/23 2:52 PM:
-

Right, Oak is SNS read only, but the exception should be thrown while trying to 
create the SNS node not when trying to read it.


was (Author: kwin):
Right, Oak is SNS read only, but the exception should be thrown while trying to 
create the SNS not when trying to read it.

> Basic SNS support returns invalid node names
> 
>
> Key: OAK-10523
> URL: https://issues.apache.org/jira/browse/OAK-10523
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>Priority: Minor
>
> When encountering names using index notation in storage, oak-jcr treats the 
> index suffix as part of the name. This causes issues with other components 
> that assume that the result of {{Node.getName()}} is indeed a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (OAK-10523) Basic SNS support returns invalid node names

2023-10-31 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-10523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781402#comment-17781402
 ] 

Konrad Windszus edited comment on OAK-10523 at 10/31/23 2:44 PM:
-

Instead of modifying the behaviour of Node.getName() one could also fix/relax 
the handling of APIs called on top of Node.getName(). IIUC then this was faced 
with 
[{{NameResolver.getQName(String)}}|https://jackrabbit.apache.org/api/trunk/org/apache/jackrabbit/spi/commons/conversion/NameResolver.html#getQName-java.lang.String-]
 although the javadoc currently explicitly states that it throws 
{{IllegalNameException}} when an invalid JCR name is passed.


was (Author: kwin):
Instead of modifying the behaviour of Node.getName() one could also fix/relax 
the handling of APIs called on top of Node.getName(). IIUC then this was faced 
with 
[{{NameResolver.getQName(String)}}|https://jackrabbit.apache.org/api/trunk/org/apache/jackrabbit/spi/commons/conversion/NameResolver.html#getQName-java.lang.String-]

> Basic SNS support returns invalid node names
> 
>
> Key: OAK-10523
> URL: https://issues.apache.org/jira/browse/OAK-10523
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: jcr
>Reporter: Julian Reschke
>Priority: Minor
>
> When encountering names using index notation in storage, oak-jcr treats the 
> index suffix as part of the name. This causes issues with other components 
> that assume that the result of {{Node.getName()}} is indeed a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)