jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r655131 - in /incubator/jspwiki/trunk: ./ src/com/ecyrd/jspwiki/ src/com/ecyrd/jspwiki/auth/ src/com/ecyrd/jspwiki/auth/login/
Date Sat, 10 May 2008 17:01:17 GMT
Author: jalkanen
Date: Sat May 10 10:01:17 2008
New Revision: 655131

URL: http://svn.apache.org/viewvc?rev=655131&view=rev
Log:
Removed CheckStyle & compiler warnings.

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/AuthenticationManager.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AbstractLoginModule.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AnonymousLoginModule.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/CookieAssertionLoginModule.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/PrincipalWrapper.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseLoginModule.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiEngineCallback.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat May 10 10:01:17 2008
@@ -1,3 +1,11 @@
+2008-05-10  Janne Jalkanen <jalkanen@apache.org>
+
+        * 2.7.0-svn-21
+        
+        * Logincookies are now written with UTF-8 instead of platform
+        default encoding.  This should fix issues with users with non-ASCII
+        chars sometimes having the wrong UID when their session expires.
+
 2008-05-09  Janne Jalkanen <jalkanen@apache.org>
 
         * 2.7.0-svn-20

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Sat May 10 10:01:17 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "20";
+    public static final String     BUILD         = "21";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/AuthenticationManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/AuthenticationManager.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/AuthenticationManager.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/AuthenticationManager.java Sat May
10 10:01:17 2008
@@ -72,6 +72,10 @@
     /**
      *  This property determines whether we use JSPWiki authentication or not.
      *  Possible values are AUTH_JAAS or AUTH_CONTAINER.
+     *  <p>
+     *  Setting this is now deprecated - we do not guarantee that it works.
+     *  
+     *  @deprecated
      */
     public  static final String                PROP_SECURITY       = "jspwiki.security";
 

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AbstractLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AbstractLoginModule.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AbstractLoginModule.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AbstractLoginModule.java Sat
May 10 10:01:17 2008
@@ -70,7 +70,7 @@
      * These Principals will be added to the Subject
      * during the {@link #commit()} phase of login.
      */
-    protected Collection      m_principals;
+    protected Collection<Principal> m_principals;
 
     /**
      * Implementing classes should add Principals to this collection
@@ -113,6 +113,7 @@
      * It always returns <code>true</code>.
      * @see javax.security.auth.spi.LoginModule#abort()
      * @throws LoginException if the abort itself fails
+     * @return True, always.
      */
     public final boolean abort() throws LoginException
     {
@@ -142,10 +143,7 @@
      *         failed
      * @see javax.security.auth.spi.LoginModule#commit()
      */
-    /**
-     * @see javax.security.auth.spi.LoginModule#commit()
-     */
-    public final boolean commit() throws LoginException
+    public final boolean commit()
     {
         if ( succeeded() )
         {
@@ -181,11 +179,16 @@
      * @see javax.security.auth.spi.LoginModule#initialize(javax.security.auth.Subject,
      *      javax.security.auth.callback.CallbackHandler, java.util.Map,
      *      java.util.Map)
+     *      
+     * @param subject {@inheritDoc}
+     * @param callbackHandler {@inheritDoc}
+     * @param sharedState {@inheritDoc}
+     * @param options {@inheritDoc}
      */
     public final void initialize( Subject subject, CallbackHandler callbackHandler, Map sharedState,
Map options )
     {
         m_previousWikiPrincipals = new HashSet();
-        m_principals = new HashSet();
+        m_principals = new HashSet<Principal>();
         m_principalsToRemove = new HashSet();
         m_principalsToOverwrite = new HashSet();
         m_subject = subject;

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AnonymousLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AnonymousLoginModule.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AnonymousLoginModule.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AnonymousLoginModule.java Sat
May 10 10:01:17 2008
@@ -70,6 +70,7 @@
      * HTTP request as its response.
      * @return the result of the login; this will always be <code>true</code>.
      * @see javax.security.auth.spi.LoginModule#login()
+     * @throws {@inheritDoc}
      */
     public boolean login() throws LoginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/CookieAssertionLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/CookieAssertionLoginModule.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/CookieAssertionLoginModule.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/CookieAssertionLoginModule.java
Sat May 10 10:01:17 2008
@@ -79,6 +79,7 @@
      * found, this method returns <code>true</code>. If not found, this
      * method throws a <code>FailedLoginException</code>.
      * @see javax.security.auth.spi.LoginModule#login()
+     * @throws {@inheritDoc}
      */
     public boolean login() throws LoginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/PrincipalWrapper.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/PrincipalWrapper.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/PrincipalWrapper.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/PrincipalWrapper.java Sat May
10 10:01:17 2008
@@ -35,7 +35,7 @@
     /**
      * Constructs a new instance of this class by wrapping (decorating)
      * the supplied principal.
-     * @param principal
+     * @param principal The principal to wrap
      */
     public PrincipalWrapper( Principal principal )
     {
@@ -53,6 +53,8 @@
     
     /**
      * Returns the name of the wrapped principal.
+     * 
+     * @return The name of the wrapped principal.
      */
     public final String getName()
     {
@@ -60,9 +62,13 @@
     }
 
     /**
-     * Two PrincipalWrapper objects are equal if their internally-wrapped
-     * principals are also equal.
+     *  Two PrincipalWrapper objects are equal if their internally-wrapped
+     *  principals are also equal.
+     *  
+     *  @param obj {@inheritDoc}
+     *  @return True, if the wrapped object is also equal to our wrapped object.
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( ! ( obj instanceof PrincipalWrapper ) )
@@ -72,6 +78,12 @@
         return m_principal.equals( ( (PrincipalWrapper)obj ).getPrincipal() );
     }
 
+    /**
+     *  The hashcode is based on the hashcode of the wrapped principal.
+     *  
+     *  @return A hashcode.
+     */
+    @Override
     public int hashCode()
     {
         return m_principal.hashCode() * 13;

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseLoginModule.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseLoginModule.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseLoginModule.java
Sat May 10 10:01:17 2008
@@ -64,6 +64,8 @@
 
     /**
      * @see javax.security.auth.spi.LoginModule#login()
+     * 
+     * {@inheritDoc}
      */
     public boolean login() throws LoginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
Sat May 10 10:01:17 2008
@@ -53,6 +53,8 @@
 
     /**
      * @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
+     * 
+     * {@inheritDoc}
      */
     public final void handle( Callback[] callbacks ) throws IOException, UnsupportedCallbackException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
Sat May 10 10:01:17 2008
@@ -75,6 +75,9 @@
     /**
      * Logs in the user.
      * @see javax.security.auth.spi.LoginModule#login()
+     * 
+     * @return {@inheritDoc}
+     * @throws {@inheritDoc}
      */
     public boolean login() throws LoginException
     {
@@ -151,7 +154,7 @@
     private final void injectWebAuthorizerRoles( Authorizer authorizer, HttpServletRequest
request )
     {
         Principal[] roles = authorizer.getRoles();
-        Set foundRoles = new HashSet();
+        Set<Principal> foundRoles = new HashSet<Principal>();
         if ( authorizer instanceof WebAuthorizer )
         {
             WebAuthorizer wa = (WebAuthorizer)authorizer;

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java Sat
May 10 10:01:17 2008
@@ -57,6 +57,8 @@
 
     /**
      * @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
+     * 
+     * {@inheritDoc}
      */
     public void handle( Callback[] callbacks ) throws IOException, UnsupportedCallbackException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiEngineCallback.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiEngineCallback.java?rev=655131&r1=655130&r2=655131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiEngineCallback.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiEngineCallback.java Sat May
10 10:01:17 2008
@@ -54,5 +54,4 @@
     {
         return m_engine;
     }
-
-}
\ No newline at end of file
+}



Mime
View raw message