Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2016-02-26 09:30:04 +0000
committerAndrey Loskutov2016-02-26 15:06:12 +0000
commit599f8ad058190b3b976c5ad1b9b9491f5c1a4e1a (patch)
tree2be67f655159c905fdf7c76b465a39d1343a240d /org.eclipse.egit.ui
parent5dc7ac99cb0b52ad87e2c563f5dfecf9a800e82c (diff)
downloadegit-599f8ad058190b3b976c5ad1b9b9491f5c1a4e1a.tar.gz
egit-599f8ad058190b3b976c5ad1b9b9491f5c1a4e1a.tar.xz
egit-599f8ad058190b3b976c5ad1b9b9491f5c1a4e1a.zip
Check resource.getProject() for null before dereferencing it
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingFolderEntry.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingFolderEntry.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingFolderEntry.java
index 941d399ed7..1076bef74b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingFolderEntry.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingFolderEntry.java
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.egit.core.internal.util.ResourceUtil;
import org.eclipse.egit.ui.internal.decorators.IProblemDecoratable;
+import org.eclipse.jgit.annotations.NonNull;
/**
* A staged/unstaged folder entry in the tree
@@ -84,6 +85,8 @@ public class StagingFolderEntry implements IAdaptable, IProblemDecoratable {
/**
* @return the absolute path corresponding to the folder entry
*/
+ @SuppressWarnings("null")
+ @NonNull
public IPath getLocation() {
return repoLocation.append(repoRelativePath);
}

Back to the top