DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34674>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34674

           Summary: NullPointerException in
                    AbstractWebdavMethod/ResourceInfo
           Product: Slide
           Version: Nightly
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebDAV Server
        AssignedTo: slide-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


A bad DB instance has led to an NPE due to the assumption that fields will be 
present when, for 
whatever reason, they may not exist on the target object.  (I've got a 
corrupted db instance after 
upgrading from 2.1 - not sure how yet)

The offending stack trace:
java.lang.NullPointerException
        at 
org.apache.slide.webdav.method.AbstractWebdavMethod$ResourceInfo.<init>(AbstractWebdavMethod.j
ava:1751
)
        at 
org.apache.slide.webdav.method.GetMethod.executeRequest(GetMethod.java:238)
        at 
org.apache.slide.webdav.method.AbstractWebdavMethod.executeRedirect(AbstractWebdavMethod.java:
586)
        at 
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod.java:419)
        at org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:151)


The offending code, from ResourceInfo in AbstractWebdavMethod:

 public ResourceInfo(String path, NodeRevisionDescriptor properties) {

            this.path = path;
            this.exists = true;
            this.creationDate = properties.getCreationDateAsDate().getTime();
            this.date = properties.getLastModifiedAsDate().getTime();

getCreationDateAsDate/getLastModifiedAsDate should either be modified to always 
return a valid date 
object, or this code should be modified to deal gracefully with the null.  IMO, 
as we seem to assume 
that they're always present, it should be safe to modify 
NodeRevisionDescriptor, no?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to