geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty JettyXMLConfiguration.java
Date Thu, 09 Sep 2004 18:01:27 GMT
djencks     2004/09/09 11:01:26

  Modified:    modules/jetty/src/java/org/apache/geronimo/jetty
                        JettyXMLConfiguration.java
  Log:
  use the correct iterator
  
  Revision  Changes    Path
  1.4       +6 -10     incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/JettyXMLConfiguration.java
  
  Index: JettyXMLConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/JettyXMLConfiguration.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JettyXMLConfiguration.java	9 Sep 2004 12:17:52 -0000	1.3
  +++ JettyXMLConfiguration.java	9 Sep 2004 18:01:26 -0000	1.4
  @@ -142,11 +142,9 @@
               transport = data.get("transport-guarantee").toString(false, true).toUpperCase();
           }
   
  -        Iterator resourceIiter = node.iterator("web-resource-collection");
  -        while (resourceIiter.hasNext()) {
  +        for (Iterator resourceIiter = node.iterator("web-resource-collection"); resourceIiter.hasNext();
) {
               XmlParser.Node collection = (XmlParser.Node) resourceIiter.next();
  -            Iterator urlPattermIter = collection.iterator("url-pattern");
  -            while (urlPattermIter.hasNext()) {
  +            for (Iterator urlPattermIter = collection.iterator("url-pattern"); urlPattermIter.hasNext();
) {
                   String url = ((XmlParser.Node) urlPattermIter.next()).toString(false, true);
                   URLPattern pattern = (URLPattern) currentPatterns.get(url);
                   if (pattern == null) {
  @@ -162,9 +160,8 @@
                   }
   
                   boolean noMethods = true;
  -                Iterator methodIter = collection.iterator("http-method");
  -                while (methodIter.hasNext()) {
  -                    String method = ((XmlParser.Node) urlPattermIter.next()).toString(false,
true);
  +                for (Iterator methodIter = collection.iterator("http-method"); methodIter.hasNext();
) {
  +                    String method = ((XmlParser.Node) methodIter.next()).toString(false,
true);
                       pattern.addMethod(method);
                       allPattern.addMethod(method);
                       noMethods = false;
  @@ -176,8 +173,7 @@
                   }
   
                   if (currentPatterns == rolesPatterns) {
  -                    Iterator roleNameIter = auths.iterator("role-name");
  -                    while (roleNameIter.hasNext()) {
  +                    for (Iterator roleNameIter = auths.iterator("role-name"); roleNameIter.hasNext();
) {
                           String role = ((XmlParser.Node) roleNameIter.next()).toString(false,
true);
                           if (role.equals("*")) {
                               allRoles.add(pattern);
  
  
  

Mime
View raw message