Return-Path: X-Original-To: apmail-incubator-jspwiki-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-jspwiki-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D934CE058 for ; Sun, 6 Jan 2013 19:50:24 +0000 (UTC) Received: (qmail 17073 invoked by uid 500); 6 Jan 2013 19:50:24 -0000 Delivered-To: apmail-incubator-jspwiki-commits-archive@incubator.apache.org Received: (qmail 17054 invoked by uid 500); 6 Jan 2013 19:50:24 -0000 Mailing-List: contact jspwiki-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-commits@incubator.apache.org Received: (qmail 17044 invoked by uid 99); 6 Jan 2013 19:50:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2013 19:50:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2013 19:50:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D4BC023888EA; Sun, 6 Jan 2013 19:50:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1429584 - in /incubator/jspwiki/trunk/src/org/apache/wiki/auth/acl: Acl.java AclEntry.java AclEntryImpl.java AclImpl.java DefaultAclManager.java Date: Sun, 06 Jan 2013 19:50:03 -0000 To: jspwiki-commits@incubator.apache.org From: juanpablo@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130106195003.D4BC023888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 true, 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 null if @@ -97,19 +96,19 @@ public interface Acl * @param principal the principal to search for * @return the AclEntry associated with the principal, or null */ - 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 principals = new Vector(); @@ -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