[jboss-dev-forums] [Design of POJO Server] - Re: VFS caching is broken

alesj do-not-reply at jboss.com
Mon Dec 10 13:26:55 EST 2007


I've been explaining this before - http://www.jboss.org/index.html?module=bb&op=viewtopic&t=122900 - that getLastModified is broken. :-)

Since this is what I had to do in order to be able to delete file in winz:

  |    public void testFileURLs()
  |       throws Exception
  |    {
  |       File tmp = File.createTempFile("testFileURLs", null);
  |       URL tmpURL = tmp.toURL();
  |       URLConnection conn = tmpURL.openConnection();
  |       InputStream in = conn.getInputStream();
  |       long lastModified;
  |       try
  |       {
  |          lastModified = conn.getLastModified();
  |          System.out.println("lastModified, "+lastModified);
  |          assertNotSame("lastModified", 0, lastModified);
  |       }
  |       finally
  |       {
  |          in.close();
  |       }
  |       assertTrue(tmp.getAbsolutePath()+" deleted", tmp.delete());
  |       conn = tmpURL.openConnection();
  |       lastModified = conn.getLastModified();
  |       System.out.println("lastModified after delete, "+lastModified);
  |       assertEquals("lastModified", 0, lastModified);
  |    }
  | 

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

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



More information about the jboss-dev-forums mailing list