Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2011-11-22 10:16:52 +0000
committerDariusz Luksza2012-01-14 11:38:47 +0000
commit86d44d870ce88eef9e4f43177fbd8fcf3cde8308 (patch)
tree0c3316182522967459bcd1f028802a24f482fde0 /org.eclipse.egit.mylyn.ui/src/org
parent8f6eb35661ca7c32696e436c34270e8586249d3d (diff)
downloadegit-86d44d870ce88eef9e4f43177fbd8fcf3cde8308.tar.gz
egit-86d44d870ce88eef9e4f43177fbd8fcf3cde8308.tar.xz
egit-86d44d870ce88eef9e4f43177fbd8fcf3cde8308.zip
[findBugs] Return defensive copy to not expose mutable object state
Change-Id: I9dfd79711ccb14c34e9e08562a97a9fa500eecb0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.mylyn.ui/src/org')
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
index c05e2e39c4..1d8a77ac28 100644
--- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
+++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
@@ -16,6 +16,7 @@ import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.UnknownHostException;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.core.runtime.IAdapterFactory;
@@ -47,7 +48,7 @@ public class TaskReferenceFactory implements IAdapterFactory {
@SuppressWarnings({ "rawtypes" })
public Class[] getAdapterList() {
- return ADAPTER_TYPES;
+ return Arrays.copyOf(ADAPTER_TYPES, ADAPTER_TYPES.length);
}
@SuppressWarnings("rawtypes")

Back to the top