You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ie...@apache.org on 2010/01/25 11:38:11 UTC

svn commit: r902772 - /sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java

Author: ieb
Date: Mon Jan 25 10:38:10 2010
New Revision: 902772

URL: http://svn.apache.org/viewvc?rev=902772&view=rev
Log:
Revert "SLING-1282 added default behaviour back in to allow other SlingRepository implementations to continue to work as before."

This reverts commit 688e3610492b1ebc4f55a2647b50fb33e21a49d6.

Modified:
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java

Modified: sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java?rev=902772&r1=902771&r2=902772&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java (original)
+++ sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java Mon Jan 25 10:38:10 2010
@@ -140,12 +140,8 @@
 
     private String anonUser;
 
-    private char[] anonPass;
-
     private String adminUser;
 
-    private char[] adminPass;
-
     private SessionPoolManager poolManager;
 
     private Loader loader;
@@ -273,20 +269,13 @@
      * @param anonUser the user name of the anon user.
      * @return a Credentials implementation that represents the anon user.
      */
-    protected Credentials getAnonCredentials(String anonUser) {
-        // NB: this method is overridden in the Jackrabbit Service bundle to avoid using the anon password. SLING-1282
-        return new SimpleCredentials(anonUser, anonPass);
-    }
+    protected abstract Credentials getAnonCredentials(String anonUser);
     
     /**
      * @param adminUser the name of the administrative user.
      * @return a Credentials implementation that represents the administrative user.
      */
-    protected Credentials getAdministrativeCredentials(String adminUser){
-        // NB: this method is overridden in the Jackrabbit Service bundle to avoid using the admin password. SLING-1282
-        return new SimpleCredentials(adminUser, adminPass);
-    }
-     
+    protected abstract Credentials getAdministrativeCredentials(String adminUser);
 
 
     /*
@@ -629,13 +618,9 @@
             PROPERTY_DEFAULT_WORKSPACE, null));
         this.anonUser = this.getProperty(properties, PROPERTY_ANONYMOUS_USER,
             DEFAULT_ANONYMOUS_USER);
-        this.anonPass = this.getProperty(properties, PROPERTY_ANONYMOUS_PASS,
-            DEFAULT_ANONYMOUS_PASS).toCharArray();
 
         this.adminUser = this.getProperty(properties, PROPERTY_ADMIN_USER,
             DEFAULT_ADMIN_USER);
-        this.adminPass = this.getProperty(properties, PROPERTY_ADMIN_PASS,
-            DEFAULT_ADMIN_PASS).toCharArray();
 
         setPollTimeActive(getIntProperty(properties, PROPERTY_POLL_ACTIVE));
         setPollTimeInActive(getIntProperty(properties, PROPERTY_POLL_INACTIVE));
@@ -756,6 +741,7 @@
 
     // ---------- Background operation checking repository availability --------
 
+
     private void setPollTimeActive(int seconds) {
         if (seconds < MIN_POLL) {
             seconds = DEFAULT_POLL_ACTIVE;