User: user57  
  Date: 02/04/04 14:31:29

  Modified:    src/main/org/jboss/deployment/cache DeploymentCache.java
  Log:
   o Removed hack around file protocol, expect a working version of
     URL.getLastModified() instead (JBoss file protocol provides this)
  
  Revision  Changes    Path
  1.5       +4 -20     
jboss-system/src/main/org/jboss/deployment/cache/DeploymentCache.java
  
  Index: DeploymentCache.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/cache/DeploymentCache.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeploymentCache.java      4 Apr 2002 21:12:40 -0000       1.4
  +++ DeploymentCache.java      4 Apr 2002 22:31:29 -0000       1.5
  @@ -33,7 +33,7 @@
    *
    * @todo clean up stale cache members
    *
  - * @version <tt>$Revision: 1.4 $</tt>
  + * @version <tt>$Revision: 1.5 $</tt>
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Jason Dillon</a>
    */
   public class DeploymentCache
  @@ -46,6 +46,7 @@
      /** A proxy to the deployment store we are using. */
      protected DeploymentStore store;
   
  +
      /////////////////////////////////////////////////////////////////////////
      //                               Pluggables                            //
      /////////////////////////////////////////////////////////////////////////
  @@ -95,30 +96,13 @@
      //                               Deployer                              //
      /////////////////////////////////////////////////////////////////////////
   
  -   protected long getLastModified(final URL url)
  -      throws Exception
  -   {
  -      // stupid file: URLConnection does not return lastModified as one
  -      // would expect, so we have to work around it here for now...
  -      // it would be better to wrap the UC, but that is too much work for
  -      // me right now =|
  -
  -      if (url.getProtocol().equals("file")) {
  -         java.io.File file = new java.io.File(url.getFile());
  -         return file.lastModified();
  -      }
  -      else {
  -         return url.openConnection().getLastModified();
  -      }
  -   }
  -
      protected boolean isInvalid(final URL orig, final URL stored)
         throws Exception
      {
         boolean trace = log.isTraceEnabled();
   
  -      long omod = getLastModified(orig);
  -      long smod = getLastModified(stored);
  +      long omod = orig.openConnection().getLastModified();
  +      long smod = stored.openConnection().getLastModified();
   
         if (trace) {
            log.trace("Modfication times (orig, stored): " + omod + ", " + smod);
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to