Author: juanpablo
Date: Sun Jan 6 19:50:03 2013
New Revision: 1429584
URL: http://svn.apache.org/viewvc?rev=1429584&view=rev
Log:
- uses org.apache.wiki.api.exceptions.WikiException
- Acl#entries() returns a typed Enumeration of AclEntry (AclImlp was already
doing this internally)
- AclEntry#permissions() returns a typed Enumeration of Permission
(AclEntryImpl was already doing this internally)
Modified:
incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/Acl.java
incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntry.java
incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntryImpl.java
incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclImpl.java
incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/DefaultAclManager.java
Modified: incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/Acl.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/Acl.java?rev=1429584&r1=1429583&r2=1429584&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/Acl.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/Acl.java Sun Jan 6
19:50:03 2013
@@ -64,22 +64,21 @@ public interface Acl
* @return true on success, false if an entry of the same type (positive or
* negative) for the same principal is already present in this ACL
*/
- public boolean addEntry( AclEntry entry );
+ boolean addEntry( AclEntry entry );
/**
* Returns an enumeration of the entries in this ACL. Each element in the
* enumeration is of type AclEntry.
* @return an enumeration of the entries in this ACL.
*/
- @SuppressWarnings("unchecked")
- public Enumeration entries();
+ Enumeration< AclEntry > entries();
/**
* Returns <code>true</code>, if this Acl is empty.
* @return the result
* @since 2.4.68
*/
- public boolean isEmpty();
+ boolean isEmpty();
/**
* Returns all Principal objects assigned a given Permission in the access
@@ -89,7 +88,7 @@ public interface Acl
* @param permission the permission to search for
* @return an array of Principals posessing the permission
*/
- public Principal[] findPrincipals( Permission permission );
+ Principal[] findPrincipals( Permission permission );
/**
* Returns an AclEntry for a supplied Principal, or <code>null</code> if
@@ -97,19 +96,19 @@ public interface Acl
* @param principal the principal to search for
* @return the AclEntry associated with the principal, or <code>null</code>
*/
- public AclEntry getEntry( Principal principal );
+ AclEntry getEntry( Principal principal );
/**
* Removes an ACL entry from this ACL.
* @param entry the ACL entry to be removed from this ACL
* @return true on success, false if the entry is not part of this ACL
*/
- public boolean removeEntry( AclEntry entry );
+ boolean removeEntry( AclEntry entry );
/**
* Returns a string representation of the contents of this Acl.
* @return the string representation
*/
- public String toString();
+ String toString();
}
Modified: incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntry.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntry.java?rev=1429584&r1=1429583&r2=1429584&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntry.java
(original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntry.java Sun Jan
6 19:50:03 2013
@@ -77,8 +77,7 @@ public interface AclEntry
* Returns an enumeration of the permissions in this ACL entry.
* @return an enumeration of the permissions
*/
- @SuppressWarnings("unchecked")
- public Enumeration permissions();
+ public Enumeration< Permission > permissions();
/**
* Removes the specified permission from this ACL entry.
Modified: incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntryImpl.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntryImpl.java?rev=1429584&r1=1429583&r2=1429584&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntryImpl.java
(original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclEntryImpl.java Sun
Jan 6 19:50:03 2013
@@ -93,8 +93,7 @@ public class AclEntryImpl implements Acl
* Returns an enumeration of the permissions in this ACL entry.
* @return an enumeration of the permissions
*/
- @SuppressWarnings("unchecked")
- public Enumeration permissions()
+ public Enumeration< Permission > permissions()
{
return m_permissions.elements();
}
Modified: incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclImpl.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclImpl.java?rev=1429584&r1=1429583&r2=1429584&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclImpl.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/AclImpl.java Sun Jan
6 19:50:03 2013
@@ -49,7 +49,6 @@ public class AclImpl implements Acl, Ser
* @param permission the permission to search for
* @return an array of Principals possessing the permission
*/
- @SuppressWarnings("unchecked")
public Principal[] findPrincipals( Permission permission )
{
Vector<Principal> principals = new Vector<Principal>();
@@ -139,8 +138,7 @@ public class AclImpl implements Acl, Ser
* enumeration is of type AclEntry.
* @return an enumeration of the entries in this ACL.
*/
- @SuppressWarnings("unchecked")
- public Enumeration entries()
+ public Enumeration< AclEntry > entries()
{
return m_entries.elements();
}
@@ -168,7 +166,6 @@ public class AclImpl implements Acl, Ser
* Returns a string representation of the contents of this Acl.
* @return the string representation
*/
- @SuppressWarnings("unchecked")
public String toString()
{
StringBuffer sb = new StringBuffer();
Modified:
incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/DefaultAclManager.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/DefaultAclManager.java?rev=1429584&r1=1429583&r2=1429584&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/DefaultAclManager.java
(original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl/DefaultAclManager.java
Sun Jan 6 19:50:03 2013
@@ -241,7 +241,6 @@ public class DefaultAclManager implement
* @param acl the ACL
* @return the ACL string
*/
- @SuppressWarnings("unchecked")
protected static String printAcl( Acl acl )
{
// Extract the ACL entries into a Map with keys == permissions, values
== principals