Cleanup (shared instance)
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 29 Oct 2014 18:29:35 +0000 (19:29 +0100)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 29 Oct 2014 18:29:35 +0000 (19:29 +0100)
jps/jps-builders/src/org/jetbrains/jps/incremental/artifacts/ArtifactOutputToSourceMapping.java
jps/jps-builders/src/org/jetbrains/jps/incremental/storage/OneToManyPathsMapping.java
jps/jps-builders/src/org/jetbrains/jps/incremental/storage/PathStringDescriptor.java

index 08f8a8cb44c209cd529cc3a5a848f10944893262..dafd4a6d7616f491ea6df9c2786a366ebfbbc2c2 100644 (file)
@@ -35,7 +35,7 @@ import java.util.List;
  */
 public class ArtifactOutputToSourceMapping extends AbstractStateStorage<String, List<ArtifactOutputToSourceMapping.SourcePathAndRootIndex>> {
   public ArtifactOutputToSourceMapping(File storePath) throws IOException {
-    super(storePath, new PathStringDescriptor(), new SourcePathListExternalizer());
+    super(storePath, PathStringDescriptor.INSTANCE, new SourcePathListExternalizer());
   }
 
   @Override
index 35292c720257f108ed1c70206f3327ed1e6766d4..4bd5e44ac6fe64a52b3c851fdf8fea95306f9b6f 100644 (file)
@@ -30,11 +30,11 @@ import java.util.Set;
 
 /**
  * @author Eugene Zhuravlev
- *         Date: 10/11/12
+ * @since 11.10.2012
  */
 public class OneToManyPathsMapping extends AbstractStateStorage<String, Collection<String>> {
   public OneToManyPathsMapping(File storePath) throws IOException {
-    super(storePath, new PathStringDescriptor(), new PathCollectionExternalizer());
+    super(storePath, PathStringDescriptor.INSTANCE, new PathCollectionExternalizer());
   }
 
   @Override
index 2180ef6e928e236ca623d14cea31e54c559e3a8c..b7939cae949c5f9f2e8e4fea496666ad117801f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,9 +19,11 @@ import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.util.io.EnumeratorStringDescriptor;
 
 /**
-* @author nik
-*/
+ * @author nik
+ */
 public class PathStringDescriptor extends EnumeratorStringDescriptor {
+  public static final PathStringDescriptor INSTANCE = new PathStringDescriptor();
+
   @Override
   public int getHashCode(String value) {
     return FileUtil.pathHashCode(value);