ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/ACL/ACL.java
(Generate patch)

Comparing experimental/server/ACL/ACL.java (file contents):
Revision 1.5 by tdb, Sun Dec 23 01:05:35 2001 UTC vs.
Revision 1.6 by tdb, Mon Dec 24 04:17:29 2001 UTC

# Line 129 | Line 129 | public class ACL implements Serializable {
129          StringBuffer acl = new StringBuffer();
130          acl.append("{");
131          for(int i=0; i < _acl.size(); i++) {
132 <            ACLRule rule = (ACLRule) _acl.get(i);
133 <            if(rule._allow) {
134 <                acl.append(rule._expression + "=ALLOW");
135 <            }
136 <            else {
137 <                acl.append(rule._expression + "=DENY");
138 <            }
132 >            acl.append((ACLRule) _acl.get(i));
133              acl.append(",");
134          }
135          if(_defaultMode) {
# Line 193 | Line 187 | public class ACL implements Serializable {
187          private ACLRule(boolean allow, String expression) {
188              _allow = allow;
189              _expression = expression;
190 +        }
191 +        
192 +        /**
193 +         * Returns a String representation of this rule.
194 +         *
195 +         * @return A String representation of this rule.
196 +         */
197 +        public String toString() {
198 +            if(_allow) {
199 +                return _expression + "=ALLOW";
200 +            }
201 +            else {
202 +                return _expression + "=DENY";
203 +            }
204          }
205          
206          /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines