8000 Merge pull request #208 from Springrbua/master · lgrignon/typescript.java@5e5216c · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e5216c

Browse files
authored
Merge pull request angelozerr#208 from Springrbua/master
Fix possible NullPointer in IDETypeScriptRepositoryManager#getPath
2 parents c482ae5 + a92178f commit 5e5216c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/repository/IDETypeScriptRepositoryManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public IPath getPath(String path, IProject project) {
8282
// ${project_loc:node_modules/typescript
8383
String projectPath = path.substring(PROJECT_LOC_TOKEN.length(),
8484
path.endsWith(END_TOKEN) ? path.length() - 1 : path.length());
85-
return project.getLocation().append(projectPath);
85+
IPath location = project.getLocation();
86+
return location != null ? location.append(projectPath) : null;
8687
} else if (path.startsWith(WORKSPACE_LOC_TOKEN)) {
8788
String wsPath = path.substring(WORKSPACE_LOC_TOKEN.length(),
8889
path.endsWith(END_TOKEN) ? path.length() - 1 : path.length());

0 commit comments

Comments
 (0)
0