-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAK-11486: Add failing test case for session-mapped non-registered #2081
base: trunk
Are you sure you want to change the base?
Conversation
Commit-Check ✔️ |
…e URIs lead to unexpected ISE for Node.getName() or Node.getPath() LocalNameMapper now checks if only a local namespace mapping exists.
|
oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/LocalNameMapper.java
Outdated
Show resolved
Hide resolved
…e URIs lead to unexpected ISE for Node.getName() or Node.getPath() Corrected faulty fix attempt.
@@ -91,9 +91,10 @@ public synchronized String getJcrName(@NotNull String oakName) { | |||
} | |||
} | |||
} | |||
} else { | |||
throw new IllegalStateException("No namespace mapping found for " + oakName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With that we are back at the same exception as before :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we are now throwing an exception even earlier (i.e. for the first getName() without any mapping)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was an intermediate version. This current one should hopefully do, except for the problem I mentioned on Jira, which probably is something completely different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't understand why Session.addNode("foo:bar").getName()
wouldn't end up here, because
a) uri is null (there is no namespace URI registered for "foo" neither globally nor locally
b) there is no local namespace mapping for "foo"
This previously didn't lead to an exception. Now it does.
…e URIs lead to unexpected ISE for Node.getName() or Node.getPath() Fixed handling of local namespace mappings with globally unknown URIs; code cleanup.
namespace URIs