|
27 | 27 |
|
28 | 28 | import java.util.ArrayList;
|
29 | 29 | import java.util.BitSet;
|
30 |
| -import java.util.Collection; |
31 | 30 | import java.util.List;
|
32 | 31 | import java.util.stream.Collectors;
|
33 | 32 |
|
@@ -158,31 +157,6 @@ public static boolean checkIfAclBitIsSet(IAccessAuthorizer.ACLType acl,
|
158 | 157 | && !bitset.get(NONE.ordinal()));
|
159 | 158 | }
|
160 | 159 |
|
161 |
| - /** |
162 |
| - * Helper function to find and return all DEFAULT acls in input list with |
163 |
| - * scope changed to ACCESS. |
164 |
| - * @param acls |
165 |
| - * |
166 |
| - * @return list of default Acls. |
167 |
| - * */ |
168 |
| - public static Collection<OzoneAclInfo> getDefaultAclsProto( |
169 |
| - List<OzoneAcl> acls) { |
170 |
| - return acls.stream().filter(a -> a.getAclScope() == DEFAULT) |
171 |
| - .map(OzoneAcl::toProtobufWithAccessType).collect(Collectors.toList()); |
172 |
| - } |
173 |
| - |
174 |
| - /** |
175 |
| - * Helper function to find and return all DEFAULT acls in input list with |
176 |
| - * scope changed to ACCESS. |
177 |
| - * @param acls |
178 |
| - * |
179 |
| - * @return list of default Acls. |
180 |
| - * */ |
181 |
| - public static List<OzoneAcl> getDefaultAcls(List<OzoneAcl> acls) { |
182 |
| - return acls.stream().filter(a -> a.getAclScope() == DEFAULT) |
183 |
| - .collect(Collectors.toList()); |
184 |
| - } |
185 |
| - |
186 | 160 | /**
|
187 | 161 | * Helper function to inherit default ACL as access ACL for child object.
|
188 | 162 | * 1. deep copy of OzoneAcl to avoid unexpected parent default ACL change
|
@@ -232,8 +206,8 @@ public static List<OzoneAclInfo> toProtobuf(List<OzoneAcl> protoAcls) {
|
232 | 206 |
|
233 | 207 | /**
|
234 | 208 | * Add an OzoneAcl to existing list of OzoneAcls.
|
235 |
| - * @param acl |
236 | 209 | * @param existingAcls
|
| 210 | + * @param acl |
237 | 211 | * @return true if current OzoneAcls are changed, false otherwise.
|
238 | 212 | */
|
239 | 213 | public static boolean addAcl(List<OzoneAcl> existingAcls, OzoneAcl acl) {
|
@@ -261,6 +235,7 @@ public static boolean addAcl(List<OzoneAcl> existingAcls, OzoneAcl acl) {
|
261 | 235 |
|
262 | 236 | /**
|
263 | 237 | * remove OzoneAcl from existing list of OzoneAcls.
|
| 238 | + * @param existingAcls |
264 | 239 | * @param acl
|
265 | 240 | * @return true if current OzoneAcls are changed, false otherwise.
|
266 | 241 | */
|
|
0 commit comments