|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2005, 2011 IBM Corporation and others. |
2 |
* Copyright (c) 2005, 2013 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 16-21
Link Here
|
| 16 |
import java.lang.reflect.InvocationTargetException; |
16 |
import java.lang.reflect.InvocationTargetException; |
| 17 |
import java.lang.reflect.Method; |
17 |
import java.lang.reflect.Method; |
| 18 |
import java.net.*; |
18 |
import java.net.*; |
|
|
19 |
import java.security.AccessController; |
| 19 |
import java.util.*; |
20 |
import java.util.*; |
| 20 |
import org.eclipse.core.runtime.adaptor.EclipseStarter; |
21 |
import org.eclipse.core.runtime.adaptor.EclipseStarter; |
| 21 |
import org.eclipse.core.runtime.adaptor.LocationManager; |
22 |
import org.eclipse.core.runtime.adaptor.LocationManager; |
|
Lines 31-36
Link Here
|
| 31 |
import org.eclipse.osgi.framework.internal.core.Constants; |
32 |
import org.eclipse.osgi.framework.internal.core.Constants; |
| 32 |
import org.eclipse.osgi.framework.log.FrameworkLogEntry; |
33 |
import org.eclipse.osgi.framework.log.FrameworkLogEntry; |
| 33 |
import org.eclipse.osgi.framework.util.KeyedHashSet; |
34 |
import org.eclipse.osgi.framework.util.KeyedHashSet; |
|
|
35 |
import org.eclipse.osgi.framework.util.SecureAction; |
| 34 |
import org.eclipse.osgi.internal.loader.BundleLoader; |
36 |
import org.eclipse.osgi.internal.loader.BundleLoader; |
| 35 |
import org.eclipse.osgi.internal.loader.BundleLoaderProxy; |
37 |
import org.eclipse.osgi.internal.loader.BundleLoaderProxy; |
| 36 |
import org.eclipse.osgi.service.datalocation.Location; |
38 |
import org.eclipse.osgi.service.datalocation.Location; |
|
Lines 49-54
Link Here
|
| 49 |
private static final String OPTION_RESOLVER_READER = RUNTIME_ADAPTOR + "/resolver/reader/timing"; //$NON-NLS-1$ |
51 |
private static final String OPTION_RESOLVER_READER = RUNTIME_ADAPTOR + "/resolver/reader/timing"; //$NON-NLS-1$ |
| 50 |
private static final String PROP_FRAMEWORK_EXTENSIONS = "osgi.framework.extensions"; //$NON-NLS-1$ |
52 |
private static final String PROP_FRAMEWORK_EXTENSIONS = "osgi.framework.extensions"; //$NON-NLS-1$ |
| 51 |
private static final String PROP_BUNDLE_STORE = "osgi.bundlestore"; //$NON-NLS-1$ |
53 |
private static final String PROP_BUNDLE_STORE = "osgi.bundlestore"; //$NON-NLS-1$ |
|
|
54 |
|
| 55 |
static final SecureAction secureAction = AccessController.doPrivileged(SecureAction.createSecureAction()); |
| 56 |
private static final String PROPERTY_STRICT_BUNDLE_ENTRY_PATH = "osgi.strictBundleEntryPath";//$NON-NLS-1$ |
| 57 |
private static final String PROPERTY_STRICT_BUNDLE_ENTRY_PATH_DEFAULT_VALUE = "false";//$NON-NLS-1$ |
| 52 |
// The name of the bundle data directory |
58 |
// The name of the bundle data directory |
| 53 |
static final String DATA_DIR_NAME = "data"; //$NON-NLS-1$ |
59 |
static final String DATA_DIR_NAME = "data"; //$NON-NLS-1$ |
| 54 |
static final String LIB_TEMP = "libtemp"; //$NON-NLS-1$ |
60 |
static final String LIB_TEMP = "libtemp"; //$NON-NLS-1$ |
|
Lines 740-749
Link Here
|
| 740 |
// No factories configured or they declined to create the bundle file; do default |
746 |
// No factories configured or they declined to create the bundle file; do default |
| 741 |
if (result == null && content instanceof File) { |
747 |
if (result == null && content instanceof File) { |
| 742 |
File file = (File) content; |
748 |
File file = (File) content; |
| 743 |
if (isDirectory(data, base, file)) |
749 |
if (isDirectory(data, base, file)) { |
| 744 |
result = new DirBundleFile(file); |
750 |
boolean strictPath = Boolean.parseBoolean(secureAction.getProperty(PROPERTY_STRICT_BUNDLE_ENTRY_PATH, PROPERTY_STRICT_BUNDLE_ENTRY_PATH_DEFAULT_VALUE)); |
| 745 |
else |
751 |
result = new DirBundleFile(file, strictPath); |
|
|
752 |
} else { |
| 746 |
result = new ZipBundleFile(file, data, mruList); |
753 |
result = new ZipBundleFile(file, data, mruList); |
|
|
754 |
} |
| 747 |
} |
755 |
} |
| 748 |
|
756 |
|
| 749 |
if (result == null && content instanceof String) { |
757 |
if (result == null && content instanceof String) { |