dgraham     2002/11/24 14:04:07

  Modified:    src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Formatted code.
  
  Revision  Changes    Path
  1.26      +19 -14    
jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java
  
  Index: ImgTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ImgTag.java       24 Nov 2002 22:01:53 -0000      1.25
  +++ ImgTag.java       24 Nov 2002 22:04:06 -0000      1.26
  @@ -586,18 +586,20 @@
        */
       protected String url(String url) throws JspException {
   
  -        if (url == null)
  +        if (url == null) {
               return (url);
  +        }
   
           // Start with an unadorned URL as specified
           StringBuffer src = new StringBuffer(url);
   
           // Append a single-parameter name and value, if requested
           if ((paramId != null) && (paramName != null)) {
  -            if (src.toString().indexOf('?') < 0)
  +            if (src.toString().indexOf('?') < 0) {
                   src.append('?');
  -            else
  +            } else {
                   src.append('&');
  +            }
               src.append(paramId);
               src.append('=');
               Object value = RequestUtils.lookup(pageContext, paramName, 
paramProperty, paramScope);
  @@ -611,8 +613,10 @@
               RequestUtils.saveException(pageContext, e);
               throw e;
           }
  -        if (name == null)
  +
  +        if (name == null) {
               return (src.toString());
  +        }
   
           // Look up the map we will be using
           Object mapObject = RequestUtils.lookup(pageContext, name, property, scope);
  @@ -631,9 +635,9 @@
               String key = (String) keys.next();
               Object value = map.get(key);
               if (value == null) {
  -                if (question)
  +                if (question) {
                       src.append('&');
  -                else {
  +                } else {
                       src.append('?');
                       question = true;
                   }
  @@ -643,9 +647,9 @@
               } else if (value instanceof String[]) {
                   String values[] = (String[]) value;
                   for (int i = 0; i < values.length; i++) {
  -                    if (question)
  +                    if (question) {
                           src.append('&');
  -                    else {
  +                    } else {
                           src.append('?');
                           question = true;
                       }
  @@ -654,9 +658,10 @@
                       src.append(RequestUtils.encodeURL(values[i]));
                   }
               } else {
  -                if (question)
  +
  +                if (question) {
                       src.append('&');
  -                else {
  +                } else {
                       src.append('?');
                       question = true;
                   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to