incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1542629 - /sling/trunk/contrib/extensions/tenant/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
Date Sun, 17 Nov 2013 01:30:08 GMT
Author: fmeschbe
Date: Sun Nov 17 01:30:08 2013
New Revision: 1542629

URL: http://svn.apache.org/r1542629
Log:
SLING-3247 Guard against ClassCastException checking
whether the session actually is a JackrabbitSession

Modified:
    sling/trunk/contrib/extensions/tenant/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java

Modified: sling/trunk/contrib/extensions/tenant/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/tenant/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java?rev=1542629&r1=1542628&r2=1542629&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/tenant/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
(original)
+++ sling/trunk/contrib/extensions/tenant/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
Sun Nov 17 01:30:08 2013
@@ -113,9 +113,8 @@ class TenantAdapterFactory implements Ad
 
 	private <AdapterType> AdapterType getAdapter(Session session,
 			Class<AdapterType> type) {
-	    if ( session != null ) {
+	    if ( session instanceof JackrabbitSession) {
     		String userID = session.getUserID();
-
     		JackrabbitSession jrSession = (JackrabbitSession) session;
     		try {
     			Authorizable authorizable = jrSession.getUserManager()



Mime
View raw message