jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1866144 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/ jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi...
Date Fri, 30 Aug 2019 11:41:31 GMT
Author: reschke
Date: Fri Aug 30 11:41:31 2019
New Revision: 1866144

URL: http://svn.apache.org/viewvc?rev=1866144&view=rev
Log:
JCR-4467: Remove all usage of java.security.acl.Group for Java 14

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/EveryonePrincipal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/GroupPrincipals.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/PrincipalManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
    jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
    jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java
    jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java
    jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/EveryonePrincipal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/EveryonePrincipal.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/EveryonePrincipal.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/EveryonePrincipal.java
Fri Aug 30 11:41:31 2019
@@ -25,7 +25,7 @@ import java.util.Enumeration;
 /**
  * The EveryonePrincipal contains all principals (excluding itself).
  */
-public final class EveryonePrincipal implements java.security.acl.Group, GroupPrincipal,
JackrabbitPrincipal {
+public final class EveryonePrincipal implements GroupPrincipal, JackrabbitPrincipal {
 
     public static final String NAME = "everyone";
     private static final EveryonePrincipal INSTANCE = new EveryonePrincipal();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/GroupPrincipals.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/GroupPrincipals.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/GroupPrincipals.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/GroupPrincipals.java
Fri Aug 30 11:41:31 2019
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.core.security.principal;
 
 import java.security.Principal;
-import java.security.acl.Group;
 import java.util.Collections;
 import java.util.Enumeration;
 
@@ -41,7 +40,7 @@ public final class GroupPrincipals {
      * @return true if the principal is of type group.
      */
     public static boolean isGroup(Principal principal) {
-        return principal instanceof Group || principal instanceof GroupPrincipal;
+        return principal instanceof GroupPrincipal;
     }
 
     /**
@@ -50,9 +49,6 @@ public final class GroupPrincipals {
      * @return an enumeration of the group members.
      */
     public static Enumeration<? extends Principal> members(Principal principal) {
-        if (principal instanceof Group) {
-            return ((Group) principal).members();
-        }
         if (principal instanceof GroupPrincipal) {
             return ((GroupPrincipal) principal).members();
         }
@@ -66,9 +62,6 @@ public final class GroupPrincipals {
      * @return true if the principal is a member of this group, false otherwise.
      */
     public static boolean isMember(Principal principal, Principal member) {
-        if (principal instanceof Group) {
-            return ((Group) principal).isMember(member);
-        }
         if (principal instanceof GroupPrincipal) {
             return ((GroupPrincipal) principal).isMember(member);
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/PrincipalManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/PrincipalManagerImpl.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/PrincipalManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/principal/PrincipalManagerImpl.java
Fri Aug 30 11:41:31 2019
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.core.security.principal;
 
 import java.security.Principal;
-import java.security.acl.Group;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -212,7 +211,7 @@ public class PrincipalManagerImpl implem
      * due to the fact, that the principal provider is not bound to a particular
      * Session object.
      */
-    private class CheckedGroup implements Group, GroupPrincipal, JackrabbitPrincipal {
+    private class CheckedGroup implements GroupPrincipal, JackrabbitPrincipal {
 
         final Principal delegatee;
         private final PrincipalProvider provider;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
Fri Aug 30 11:41:31 2019
@@ -291,7 +291,7 @@ class GroupImpl extends AuthorizableImpl
     /**
      * Principal Implementation
      */
-    private class NodeBasedGroup extends NodeBasedPrincipal implements java.security.acl.Group,
GroupPrincipal {
+    private class NodeBasedGroup extends NodeBasedPrincipal implements GroupPrincipal {
 
         private NodeBasedGroup(String name) {
             super(name);

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
Fri Aug 30 11:41:31 2019
@@ -20,10 +20,10 @@ package org.apache.jackrabbit.rmi.client
 
 import java.rmi.RemoteException;
 import java.security.Principal;
-import java.security.acl.Group;
 import java.util.Enumeration;
 import java.util.Iterator;
 
+import org.apache.jackrabbit.api.security.principal.GroupPrincipal;
 import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
 import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
 import org.apache.jackrabbit.rmi.remote.RemoteIterator;
@@ -38,7 +38,7 @@ import org.apache.jackrabbit.rmi.remote.
  * @see Group
  * @see RemoteGroup
  */
-public class ClientGroup extends ClientPrincipal implements Group {
+public class ClientGroup extends ClientPrincipal implements GroupPrincipal {
 
     private final LocalAdapterFactory factory;
 

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java
Fri Aug 30 11:41:31 2019
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@org.osgi.annotation.versioning.Version("3.1.0")
+@org.osgi.annotation.versioning.Version("4.0.0")
 package org.apache.jackrabbit.rmi.client.principal;

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java
Fri Aug 30 11:41:31 2019
@@ -20,7 +20,6 @@ package org.apache.jackrabbit.rmi.server
 
 import java.rmi.RemoteException;
 import java.security.Principal;
-import java.security.acl.Group;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.Iterator;
@@ -32,7 +31,7 @@ import org.apache.jackrabbit.rmi.server.
 
 public class ServerGroup extends ServerPrincipal implements RemoteGroup {
 
-    public ServerGroup(final Group principal, final RemoteAdapterFactory factory)
+    public ServerGroup(final GroupPrincipal principal, final RemoteAdapterFactory factory)
             throws RemoteException {
         super(principal, factory);
     }
@@ -81,16 +80,13 @@ public class ServerGroup extends ServerP
     }
 
     public static boolean isGroup(Principal principal) {
-        return principal instanceof Group || principal instanceof GroupPrincipal;
+        return principal instanceof GroupPrincipal;
     }
 
     private static Enumeration<? extends Principal> members(Principal principal) {
-        if (principal instanceof Group) {
-            return ((Group) principal).members();
-        }
         if (principal instanceof GroupPrincipal) {
             return ((GroupPrincipal) principal).members();
         }
         return Collections.emptyEnumeration();
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java?rev=1866144&r1=1866143&r2=1866144&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java
Fri Aug 30 11:41:31 2019
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@org.osgi.annotation.versioning.Version("3.1.0")
+@org.osgi.annotation.versioning.Version("4.0.0")
 package org.apache.jackrabbit.rmi.server.principal;



Mime
View raw message