diff options
author | Ed Merks | 2015-11-20 11:38:23 +0000 |
---|---|---|
committer | Thomas Watson | 2015-12-01 14:50:13 +0000 |
commit | 2ed8a30003a6d69ee0fa3fd89314a40e4637b528 (patch) | |
tree | 5a5d0494a444d15405bf6906aec6b56fa2dad56c | |
parent | b1efdd4f1c5743718bc719082ad505a24458c925 (diff) | |
download | rt.equinox.framework-2ed8a30003a6d69ee0fa3fd89314a40e4637b528.tar.gz rt.equinox.framework-2ed8a30003a6d69ee0fa3fd89314a40e4637b528.tar.xz rt.equinox.framework-2ed8a30003a6d69ee0fa3fd89314a40e4637b528.zip |
Bug 482673 Make Storage.needsDiscarding(Generation) faster
Change-Id: I2bb4a644e73e63ce532996607bfc788a53686508
Signed-off-by: Ed Merks <ed.merks@gmail.com>
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java index 65d7b4394..f87e0019f 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java @@ -24,7 +24,10 @@ import org.eclipse.osgi.framework.log.FrameworkLogEntry; import org.eclipse.osgi.framework.util.*; import org.eclipse.osgi.internal.container.LockSet; import org.eclipse.osgi.internal.debug.Debug; -import org.eclipse.osgi.internal.framework.*; +import org.eclipse.osgi.internal.framework.EquinoxConfiguration; +import org.eclipse.osgi.internal.framework.EquinoxContainer; +import org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor; +import org.eclipse.osgi.internal.framework.FilterImpl; import org.eclipse.osgi.internal.hookregistry.BundleFileWrapperFactoryHook; import org.eclipse.osgi.internal.hookregistry.StorageHookFactory; import org.eclipse.osgi.internal.hookregistry.StorageHookFactory.StorageHook; @@ -230,15 +233,16 @@ public class Storage { } } File content = generation.getContent(); - if (!content.exists()) { - // the content got deleted since last time! - return true; - } if (getConfiguration().inCheckConfigurationMode()) { - if (generation.isDirectory()) + if (generation.isDirectory()) { content = new File(content, "META-INF/MANIFEST.MF"); //$NON-NLS-1$ + } return generation.getLastModified() != secureAction.lastModified(content); } + if (!content.exists()) { + // the content got deleted since last time! + return true; + } return false; } |