core/src/main/java/org/sakaiproject/nakamura/api/lite/accesscontrol/AclModification.java
public static Permission[] listPermissions(int perms) {
        List<Permission> permissions = Lists.newArrayList();
        for (Permission p : Permissions.PRIMARY_PERMISSIONS) {
            if ((perms & p.getPermission()) == p.getPermission()) {
                permissions.add(p);
            }
        }
        return permissions.toArray(new Permission[permissions.size()]);
    }
public static Permission[] listPermissions(int perms) {
        List<Permission> permissions = Lists.newArrayList();
        for (Permission p : Permissions.PRIMARY_PERMISSIONS) {
            if ((perms & p.getPermission()) == p.getPermission()) {
                permissions.add(p);
            }
        }
        return permissions.toArray(new Permission[permissions.size()]);
    }
public static Permission [ ] listPermissions ( int perms ) { List < Permission > permissions = Lists . newArrayList ( ) ; for ( Permission p : Permissions . PRIMARY_PERMISSIONS ) { if ( ( perms & p . getPermission ( ) ) == p . getPermission ( ) ) { permissions . add ( p ) ; } } return permissions . toArray ( new Permission [ permissions . size ( ) ] ) ; }
TODO: Unit test
TODO : Unit test