File tree Expand file tree Collapse file tree 4 files changed +2
-95
lines changed
libs/agent-sm/agent-policy/src/main/java/org/opensearch/secure_sm/policy Expand file tree Collapse file tree 4 files changed +2
-95
lines changed Original file line number Diff line number Diff line change 77 */
88package org .opensearch .secure_sm .policy ;
99
10- import java .io .PrintWriter ;
1110import java .util .Collections ;
1211import java .util .LinkedList ;
1312import java .util .List ;
@@ -23,30 +22,4 @@ public void add(PermissionEntry entry) {
2322 public List <PermissionEntry > permissionElements () {
2423 return Collections .unmodifiableList (permissionEntries );
2524 }
26-
27- public void write (PrintWriter out ) {
28- out .print ("grant" );
29- if (codeBase != null ) {
30- out .print (" Codebase \" " );
31- out .print (codeBase );
32- out .print ("\" " );
33- }
34- out .println (" {" );
35- for (PermissionEntry pe : permissionEntries ) {
36- out .print (" permission " );
37- out .print (pe .permission );
38- if (pe .name != null ) {
39- out .print (" \" " );
40- out .print (pe .name );
41- out .print ("\" " );
42- }
43- if (pe .action != null ) {
44- out .print (", \" " );
45- out .print (pe .action );
46- out .print ("\" " );
47- }
48- out .println (";" );
49- }
50- out .println ("};" );
51- }
5225}
Original file line number Diff line number Diff line change 77 */
88package org .opensearch .secure_sm .policy ;
99
10- import java .io .PrintWriter ;
1110import java .util .Objects ;
1211
1312public class PermissionEntry {
@@ -29,20 +28,4 @@ public boolean equals(Object obj) {
2928 && Objects .equals (this .name , that .name )
3029 && Objects .equals (this .action , that .action );
3130 }
32-
33- public void write (PrintWriter out ) {
34- out .print ("permission " );
35- out .print (permission );
36- if (name != null ) {
37- out .print (" \" " );
38- out .print (name .replaceAll ("\\ \\ " , "\\ \\ \\ \\ " ).replaceAll ("\" " , "\\ \\ \\ \" " ));
39- out .print ('"' );
40- }
41- if (action != null ) {
42- out .print (", \" " );
43- out .print (action );
44- out .print ('"' );
45- }
46- out .println (";" );
47- }
4831}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1818import java .util .Collections ;
1919import java .util .List ;
2020import java .util .Optional ;
21- import java .util .Vector ;
2221
2322public class PolicyParser {
2423
25- private final Vector <GrantEntry > grantEntries = new Vector <>();
24+ private final List <GrantEntry > grantEntries = Collections .synchronizedList (new ArrayList <>());
25+
2626 private TokenStream tokenStream ;
2727
2828 public PolicyParser () {}
You can’t perform that action at this time.
0 commit comments