----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 18, 2001 3:47 PM
Subject: cvs commit:
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods
LockMethod.java


> jericho     01/05/17 23:47:31
>
>   Modified:    src/webdav/client/src/org/apache/webdav/lib/methods
>                         LockMethod.java
>   Log:

- Make code robust.
  If it's failed to parse, ignore it.  ;-0

Hmm...  I made the wrong commit message.  :(

>   @@ -273,7 +273,10 @@
>            else if(headerName.equalsIgnoreCase("Timeout")){
>                if (headerValue.startsWith("Second-"))
>                    headerValue =
headerValue.substring("Second-".length());
>   -            setTimeout(Long.parseLong(headerValue));
>   +            try {
>   +                setTimeout(Long.parseLong(headerValue));
>   +            } catch (NumberFormatException e) {
>   +            }
>            }
>            else{
>                super.setHeader(headerName, headerValue);
>   @@ -290,7 +293,8 @@
>        public void setDepth(int depth) {
>            checkNotUsed();
>            if (depth != DEPTH_0 && depth != DEPTH_INFINITY) {
>   -            throw new IllegalArgumentException("invalid depth value for
lock method " + depth);
>   +            throw new IllegalArgumentException
>   +            ("invalid depth value for lock method " + depth);
>            }
>            this.depth = depth;
>        }
>
>
>

Reply via email to