Author: ivaynberg
Date: Thu Jun 26 09:51:16 2008
New Revision: 671946

URL: http://svn.apache.org/viewvc?rev=671946&view=rev
Log:
WICKET-1715 Generified SimplePageAuthorizationStrategy violates its contract

Modified:
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java?rev=671946&r1=671945&r2=671946&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java
 Thu Jun 26 09:51:16 2008
@@ -57,7 +57,7 @@
        /**
         * The supertype (class or interface) of Pages that require 
authorization to be instantiated.
         */
-       private final WeakReference<Class<? extends Component<?>>> 
securePageSuperTypeRef;
+       private final WeakReference<Class<?>> securePageSuperTypeRef;
 
        /**
         * Construct.
@@ -71,16 +71,15 @@
         * @param signInPageClass
         *            The sign in page class
         */
-       public <C extends Component<?>, S extends Page<?>> 
SimplePageAuthorizationStrategy(
-               final Class<C> securePageSuperType, final Class<S> 
signInPageClass)
+       public <S extends Page<?>> SimplePageAuthorizationStrategy(final 
Class<?> securePageSuperType,
+               final Class<S> signInPageClass)
        {
                if (securePageSuperType == null)
                {
                        throw new IllegalArgumentException("Secure page super 
type must not be null");
                }
 
-               securePageSuperTypeRef = new WeakReference<Class<? extends 
Component<?>>>(
-                       securePageSuperType);
+               securePageSuperTypeRef = new 
WeakReference<Class<?>>(securePageSuperType);
 
                // Handle unauthorized access to pages
                
Application.get().getSecuritySettings().setUnauthorizedComponentInstantiationListener(


Reply via email to