File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
core/src/main/java/dev/vml/es/acm/core Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,9 @@ public AclResult removeAllMembers() {
102
102
103
103
public Stream <AclAuthorizable > getMembers () {
104
104
try {
105
+ return StreamUtils .asStream (group .getMembers ())
105
106
.map (context ::determineAuthorizable )
107
+ .filter (a -> a != null );
106
108
} catch (RepositoryException e ) {
107
109
throw new AclException (String .format ("Failed to get members of group '%s'" , getId ()), e );
108
110
}
Original file line number Diff line number Diff line change @@ -74,7 +74,9 @@ public void lock(String lockName) {
74
74
props .put (JcrConstants .JCR_PRIMARYTYPE , RESOURCE_TYPE );
75
75
props .put (LOCKED_PROP , Calendar .getInstance ());
76
76
resolver .create (dirResource , nodeName , props );
77
- resolver .commit ();
77
+ if (autoCommit .get ()) {
78
+ resolver .commit ();
79
+ }
78
80
LOG .debug ("Created lock '{}'" , name );
79
81
return ;
80
82
} catch (PersistenceException e ) {
@@ -108,7 +110,9 @@ public void unlock(String lockName) {
108
110
return ;
109
111
}
110
112
resolver .delete (lockCurrent );
111
- resolver .commit ();
113
+ if (autoCommit .get ()) {
114
+ resolver .commit ();
115
+ }
112
116
LOG .debug ("Deleted lock '{}'" , name );
113
117
return ;
114
118
} catch (PersistenceException e ) {
@@ -133,7 +137,9 @@ public void unlockAll() {
133
137
}
134
138
try {
135
139
resolver .delete (root );
136
- resolver .commit ();
140
+ if (autoCommit .get ()) {
141
+ resolver .commit ();
142
+ }
137
143
LOG .debug ("Deleted all locks" );
138
144
} catch (PersistenceException e ) {
139
145
throw new AcmException ("Cannot delete all locks!" , e );
You can’t perform that action at this time.
0 commit comments