sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-tenant] 23/44: SLING-3247 Guard against ClassCastException checking whether the session actually is a JackrabbitSession
Date Wed, 18 Oct 2017 23:26:04 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tenant.git

commit 07012f009b6a69681579ae282925d8ef24f50b45
Author: Felix Meschberger <fmeschbe@apache.org>
AuthorDate: Sun Nov 17 01:30:08 2013 +0000

    SLING-3247 Guard against ClassCastException checking
    whether the session actually is a JackrabbitSession
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1542629 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/tenant/internal/TenantAdapterFactory.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java b/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
index 4048ec4..1090ac1 100644
--- a/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
+++ b/src/main/java/org/apache/sling/tenant/internal/TenantAdapterFactory.java
@@ -113,9 +113,8 @@ class TenantAdapterFactory implements AdapterFactory {
 
 	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()

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message