This is an automated email from the ASF dual-hosted git repository.
ieb pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-resource.git
The following commit(s) were added to refs/heads/master by this push:
new 0e2ebd0 SLING-7140 Support redirects to URLs provided by the
underlying resource provider Must catch IllegalArgumentExceptions from the URI
Provider to try others.
0e2ebd0 is described below
commit 0e2ebd0f1a5c7cb2044b2d754945eb0ee7641081
Author: Ian Boston <[email protected]>
AuthorDate: Mon Oct 23 14:22:18 2017 +0100
SLING-7140 Support redirects to URLs provided by the underlying resource
provider
Must catch IllegalArgumentExceptions from the URI Provider to try others.
---
.../jcr/resource/internal/helper/jcr/JcrNodeResource.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
b/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
index 9949cfe..408b703 100644
---
a/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
+++
b/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
@@ -231,9 +231,13 @@ class JcrNodeResource extends JcrItemResource<Node> { //
this should be package
*/
private URI convertToPublicURI() {
for (URIProvider up : helper.getURIProviders()) {
- URI u = up.toURI(this, URIProvider.Scope.EXTERNAL,
URIProvider.Operation.READ);
- if ( u != null) {
- return u;
+ try {
+ URI uri = up.toURI(this, URIProvider.Scope.EXTERNAL,
URIProvider.Operation.READ);
+ if ( uri != null ) {
+ return uri;
+ }
+ } catch (IllegalArgumentException e) {
+ LOGGER.debug(up.getClass().toString()+" declined toURI ", e);
}
}
return null;
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].