From 332725cabd4bf5f14eea09d1f4bcc01073edacfa Mon Sep 17 00:00:00 2001 From: Sergey Evdokimov Date: Mon, 21 Jan 2013 18:10:29 +0400 Subject: [PATCH] Minor code change. --- .../idea/maven/model/MavenWorkspaceMap.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/plugins/maven/maven-server-api/src/org/jetbrains/idea/maven/model/MavenWorkspaceMap.java b/plugins/maven/maven-server-api/src/org/jetbrains/idea/maven/model/MavenWorkspaceMap.java index 68c8770e3c5c..51126b126c57 100644 --- a/plugins/maven/maven-server-api/src/org/jetbrains/idea/maven/model/MavenWorkspaceMap.java +++ b/plugins/maven/maven-server-api/src/org/jetbrains/idea/maven/model/MavenWorkspaceMap.java @@ -15,18 +15,15 @@ */ package org.jetbrains.idea.maven.model; -import gnu.trove.THashMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.Serializable; -import java.util.Arrays; -import java.util.List; -import java.util.Set; +import java.util.*; public class MavenWorkspaceMap implements Serializable { - private final THashMap myMapping = new THashMap(); + private final Map myMapping = new HashMap(); public void register(@NotNull MavenId id, @NotNull File file) { register(id, file, null); @@ -54,15 +51,15 @@ public class MavenWorkspaceMap implements Serializable { return myMapping.keySet(); } - private static List getAllIDs(MavenId id) { + private static MavenId[] getAllIDs(MavenId id) { String version = id.getVersion(); if (version != null && version.contains("SNAPSHOT")) { - return Arrays.asList(id, new MavenId(id.getGroupId(), id.getArtifactId(), "LATEST")); + return new MavenId[]{id, new MavenId(id.getGroupId(), id.getArtifactId(), "LATEST")}; } else { - return Arrays.asList(id, - new MavenId(id.getGroupId(), id.getArtifactId(), "LATEST"), - new MavenId(id.getGroupId(), id.getArtifactId(), "RELEASE")); + return new MavenId[]{id, + new MavenId(id.getGroupId(), id.getArtifactId(), "LATEST"), + new MavenId(id.getGroupId(), id.getArtifactId(), "RELEASE")}; } }