luetzkendorf    2005/01/03 07:07:07

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        PropPatchMethod.java
  Log:
  test of valid property values generalized
  
  Revision  Changes    Path
  1.89      +20 -23    
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropPatchMethod.java
  
  Index: PropPatchMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropPatchMethod.java,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- PropPatchMethod.java      29 Dec 2004 16:45:51 -0000      1.88
  +++ PropPatchMethod.java      3 Jan 2005 15:07:07 -0000       1.89
  @@ -28,7 +28,6 @@
   import java.util.Date;
   import java.util.Iterator;
   import java.util.List;
  -import java.util.StringTokenizer;
   
   import org.apache.slide.common.NamespaceAccessToken;
   import org.apache.slide.common.PropertyName;
  @@ -477,33 +476,31 @@
        */
       private boolean isSupportedPropertyValue(PropPatchProperty property, 
ResourceKind resourceKind) {
           
  -        boolean isSupportedValue = true;
           if (property.getValue() != null) {
               
  -            if ( ! resourceKind.isSupportedPropertyValue(property.getName(), 
property.getValue()) ) {
  -                isSupportedValue = false;
  -            }
  +            return resourceKind.isSupportedPropertyValue(
  +                    property.getName(), property.getValue());
               
  -            if (P_GETCONTENTLANGUAGE.equals(property.getName())) {
  -                
  -                StringTokenizer tokenizer = new 
StringTokenizer(property.getValue(), "-");
  -                String token = null;
  -                while ( isSupportedValue && tokenizer.hasMoreTokens() ) {
  -                    token = tokenizer.nextToken();
  -                    isSupportedValue = ( (token.length() >= 1) && 
(token.length() <= 8) );
  -                    int i = 0;
  -                    while (isSupportedValue && (i < token.length()) ) {
  -                        char character = token.charAt(i);
  -                        isSupportedValue =
  -                            ((character >= 'a') && (character <= 'z')) ||
  -                            ((character >= 'A') && (character <= 'Z'));
  -                        ++i;
  -                    }
  -                }
  -            }
  +//            if (P_GETCONTENTLANGUAGE.equals(property.getName())) {
  +//                
  +//                StringTokenizer tokenizer = new 
StringTokenizer(property.getValue(), "-");
  +//                String token = null;
  +//                while ( isSupportedValue && tokenizer.hasMoreTokens() ) {
  +//                    token = tokenizer.nextToken();
  +//                    isSupportedValue = ( (token.length() >= 1) && 
(token.length() <= 8) );
  +//                    int i = 0;
  +//                    while (isSupportedValue && (i < token.length()) ) {
  +//                        char character = token.charAt(i);
  +//                        isSupportedValue =
  +//                            ((character >= 'a') && (character <= 'z')) ||
  +//                            ((character >= 'A') && (character <= 'Z'));
  +//                        ++i;
  +//                    }
  +//                }
  +//            }
               
           }
  -        return isSupportedValue;
  +        return true;
       }
       
       
  
  
  

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

Reply via email to