diff options
author | mvelten | 2012-08-06 09:02:48 +0000 |
---|---|---|
committer | mvelten | 2012-08-06 09:02:48 +0000 |
commit | 6fd890c30104a620a13c7160c3d99ed6a2b31a04 (patch) | |
tree | 71c747ef898694b861f8d9668e66c2098f2215ed /plugins/team | |
parent | 9b533234e4a82db4cf6f60f34fd4a7d644c0b464 (diff) | |
download | org.eclipse.papyrus-6fd890c30104a620a13c7160c3d99ed6a2b31a04.tar.gz org.eclipse.papyrus-6fd890c30104a620a13c7160c3d99ed6a2b31a04.tar.xz org.eclipse.papyrus-6fd890c30104a620a13c7160c3d99ed6a2b31a04.zip |
386492: [Libraries - Profiles] All Libraries and Profiles should be loaded in read-only mode
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386492
fix NPE
Diffstat (limited to 'plugins/team')
-rw-r--r-- | plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java index 39ab94d4424..976c4e5ff3d 100644 --- a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java +++ b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java @@ -13,6 +13,8 @@ *****************************************************************************/
package org.eclipse.papyrus.team.svn;
+import java.util.HashSet;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -44,12 +46,14 @@ public class SVNLockHandler implements IReadOnlyHandler { }
private IFile[] getIFiles(URI[] uris) {
- IFile[] iFiles = new IFile[uris.length];
- int i = 0;
+ HashSet<IFile> iFilesSet = new HashSet<IFile>();
for(URI uri : uris) {
- iFiles[i++] = getFile(uri);
+ IFile iFile = getFile(uri);
+ if (iFile != null) {
+ iFilesSet.add(iFile);
+ }
}
- return iFiles;
+ return iFilesSet.toArray(new IFile[iFilesSet.size()]);
}
private static IFile getFile(URI uri) {
|