sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1616478 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
Date Thu, 07 Aug 2014 12:28:04 GMT
Author: asanso
Date: Thu Aug  7 12:28:04 2014
New Revision: 1616478

URL: http://svn.apache.org/r1616478
Log:
SLING-3831 - Possible NPE in JcrResourceProvider#adaptTo

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java?rev=1616478&r1=1616477&r2=1616478&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
Thu Aug  7 12:28:04 2014
@@ -392,7 +392,7 @@ public class JcrResourceProvider
             return (AdapterType) session;
         } else if (type == Principal.class) {       
             try {
-                if (this.session instanceof JackrabbitSession){
+                if (this.session instanceof JackrabbitSession && session.getUserID()!=null)
{
                     JackrabbitSession s =((JackrabbitSession) this.session);
                     final UserManager um = s.getUserManager();
                     if (um != null) {



Mime
View raw message