Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 311789
Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java (-4 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright (c) 2007, 2009 IBM Corporation and others.
2
 *  Copyright (c) 2007, 2010 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 12-22 Link Here
12
12
13
import java.io.File;
13
import java.io.File;
14
import java.lang.ref.SoftReference;
14
import java.lang.ref.SoftReference;
15
import java.net.MalformedURLException;
15
import java.net.*;
16
import java.net.URL;
17
import java.util.ArrayList;
16
import java.util.ArrayList;
18
import java.util.Iterator;
17
import java.util.Iterator;
19
import org.eclipse.core.runtime.IProgressMonitor;
18
import org.eclipse.core.runtime.IProgressMonitor;
19
import org.eclipse.core.runtime.URIUtil;
20
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
20
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
21
import org.eclipse.equinox.p2.core.IProvisioningAgent;
21
import org.eclipse.equinox.p2.core.IProvisioningAgent;
22
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfile;
Lines 149-158 Link Here
149
			String installArea = EngineActivator.getContext().getProperty(OSGI_INSTALL_AREA);
149
			String installArea = EngineActivator.getContext().getProperty(OSGI_INSTALL_AREA);
150
			try {
150
			try {
151
				URL registryURL = new URL(installArea + P2_ENGINE_DIR + SimpleProfileRegistry.DEFAULT_STORAGE_DIR);
151
				URL registryURL = new URL(installArea + P2_ENGINE_DIR + SimpleProfileRegistry.DEFAULT_STORAGE_DIR);
152
				File sharedRegistryDirectory = new File(registryURL.getPath());
152
				File sharedRegistryDirectory = URIUtil.toFile(URIUtil.toURI(registryURL));
153
				profileRegistry = new SimpleProfileRegistry(agent, sharedRegistryDirectory, null, false);
153
				profileRegistry = new SimpleProfileRegistry(agent, sharedRegistryDirectory, null, false);
154
			} catch (MalformedURLException e) {
154
			} catch (MalformedURLException e) {
155
				//this is not possible because we know the above URL is valid
155
				//this is not possible because we know the above URL is valid
156
			} catch (URISyntaxException e) {
157
				//this is not possible because we know the above URL is valid
156
			}
158
			}
157
		}
159
		}
158
		return profileRegistry;
160
		return profileRegistry;

Return to bug 311789