Changeset 4390


Ignore:
Timestamp:
Aug 12, 2008, 1:05:12 PM (14 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1043: JarClassLoader?.getInstance() doesn't create a new class loader if a secondary JAR file has changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/util/JarClassLoader.java

    r4389 r4390  
    274274      {
    275275        File jarFile = info.jarFile;
    276         isSame = jarFile.exists() &&
    277           jarFile.lastModified() == info.lastModified &&
    278           jarFile.length() == info.size;
     276        if (jarFile.exists())
     277        {
     278          isSame = info.existed &&
     279            jarFile.lastModified() == info.lastModified &&
     280            jarFile.length() == info.size;
     281        }
     282        else
     283        {
     284          isSame = !info.existed;
     285        }
    279286        if (!isSame) return true;
    280287      }
     
    404411  {
    405412    final File jarFile;
     413    final boolean existed;
    406414    final long lastModified;
    407415    final long size;
     
    410418    {
    411419      this.jarFile = jarFile;
     420      this.existed = jarFile.exists();
    412421      this.size = jarFile.length();
    413422      this.lastModified = jarFile.lastModified();
Note: See TracChangeset for help on using the changeset viewer.