[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: File locking

alesj do-not-reply at jboss.com
Tue Apr 22 08:39:53 EDT 2008


"adrian at jboss.org" wrote : "alesj" wrote : 
  |   | See URLExistsUnitTestCase in JBossVFS.
  |   | 
  | 
  | What is the purpose of this test? 
  | It is testing the JDK rather than the VFS so why is it in the VFS testsuite?
  | 
  | Surely this code:
  | 
  |   |       conn = tmpURL.openConnection();
  |   |       lastModified = conn.getLastModified();
  |   | 
  | should be changed to use the VFS to check the getLastModified works
  | and assert the file can still be deleted?
It's Scott's test.
But I think the purpose is to verify that URLConnection::lastModified can also tell you that the file has been deleted.
See comments on the test code:

  |    /**
  |     * Test file deletion can be detected via URLConnection.getLastModified == 0.
  | 
Since like it was already said, we use this for lastModified check on URL based VFS handlers.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145798#4145798

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145798



More information about the jboss-dev-forums mailing list