Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-10-15 06:35:48 +0000
committerAndrey Loskutov2018-10-15 06:35:48 +0000
commitb4a2315dbcac9350721cfbc17f221eb935160981 (patch)
treed48165d295df8446ea7959977a3608738c2409dd
parent85e54e17a132d768026569494cd2719c2a40019d (diff)
downloadeclipse.jdt.core-b4a2315dbcac9350721cfbc17f221eb935160981.tar.gz
eclipse.jdt.core-b4a2315dbcac9350721cfbc17f221eb935160981.tar.xz
eclipse.jdt.core-b4a2315dbcac9350721cfbc17f221eb935160981.zip
Bug 540122 - Could not initialize class
org.eclipse.jdt.internal.core.JavaModelManager In case platform is not started, we get a NPE asking for Platform.getOS(). So read "os.name" system property instead (which is always set). Change-Id: I9e13a461131b7c25f760edd246029bf00c7f279d Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
index 77ac23c416..deb0371b41 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
@@ -55,10 +55,9 @@ import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.DeltaProcessor.RootInfo;
import org.eclipse.jdt.internal.core.util.Messages;
import org.eclipse.jdt.internal.core.util.Util;
-import org.eclipse.osgi.service.environment.Constants;
public class ExternalFoldersManager {
- private static final boolean WINDOWS = Platform.getOS().equals(Constants.OS_WIN32);
+ private static final boolean WINDOWS = System.getProperty("os.name").startsWith("Win"); //$NON-NLS-1$//$NON-NLS-2$
private static final String EXTERNAL_PROJECT_NAME = ".org.eclipse.jdt.core.external.folders"; //$NON-NLS-1$
private static final String LINKED_FOLDER_NAME = ".link"; //$NON-NLS-1$
private Map<IPath, IFolder> folders;

Back to the top