changeset 114:d34412e9d54e 9.1.x

cleanup code after merge
author Evgeniy.Koshkin@unit-519.Labs.IntelliJ.Net
date Wed, 18 May 2016 19:30:03 +0300
parents 548a2737cc07
children c8d606a7a07c
files agent/src/META-INF/build-agent-plugin-symbol-server.xml agent/src/jetbrains/buildServer/symbols/ArtifactPathHelper.java agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java
diffstat 3 files changed, 4 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/META-INF/build-agent-plugin-symbol-server.xml	Wed May 18 19:28:26 2016 +0300
+++ b/agent/src/META-INF/build-agent-plugin-symbol-server.xml	Wed May 18 19:30:03 2016 +0300
@@ -8,6 +8,5 @@
 
   <bean class="jetbrains.buildServer.symbols.SymbolsIndexer"/>
   <bean class="jetbrains.buildServer.symbols.WinDbgToolsDetector"/>
-  <bean class="jetbrains.buildServer.symbols.ArtifactPathHelper"/>
 
 </beans>
\ No newline at end of file
--- a/agent/src/jetbrains/buildServer/symbols/ArtifactPathHelper.java	Wed May 18 19:28:26 2016 +0300
+++ b/agent/src/jetbrains/buildServer/symbols/ArtifactPathHelper.java	Wed May 18 19:30:03 2016 +0300
@@ -1,11 +1,7 @@
 package jetbrains.buildServer.symbols;
 
-import jetbrains.buildServer.ExtensionHolder;
-import jetbrains.buildServer.agent.impl.artifacts.ArchivePreprocessor;
 import jetbrains.buildServer.util.ArchiveType;
 import jetbrains.buildServer.util.ArchiveUtil;
-import jetbrains.buildServer.util.CollectionsUtil;
-import jetbrains.buildServer.util.filters.Filter;
 import org.jetbrains.annotations.NotNull;
 
 /**
@@ -16,20 +12,14 @@
     private static final String ARCHIVE_PATH_SEPARATOR_FULL = "!/";
     private static final String FOLDER_SEPARATOR = "/";
 
-    private final ExtensionHolder myExtensions;
-
-    public ArtifactPathHelper(@NotNull final ExtensionHolder extensions) {
-        myExtensions = extensions;
-    }
-
     @NotNull
-    String concatenateArtifactPath(String fileNamePrefix, String pdbFileName) {
+    static String concatenateArtifactPath(String fileNamePrefix, String pdbFileName) {
       final String normilizedFileNamePrefix = fileNamePrefix.replace(ARCHIVE_PATH_SEPARATOR, ARCHIVE_PATH_SEPARATOR_FULL);
       final String delimiter = (isPathToArchive(normilizedFileNamePrefix) && !normilizedFileNamePrefix.contains(ARCHIVE_PATH_SEPARATOR)) ? ARCHIVE_PATH_SEPARATOR_FULL : FOLDER_SEPARATOR;
         return normilizedFileNamePrefix + delimiter + pdbFileName;
     }
 
-    private boolean isPathToArchive(@NotNull final String path){
+    static private boolean isPathToArchive(@NotNull final String path){
         return ArchiveUtil.getArchiveType(path) != ArchiveType.NOT_ARCHIVE;
     }
 }
--- a/agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java	Wed May 18 19:28:26 2016 +0300
+++ b/agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java	Wed May 18 19:30:03 2016 +0300
@@ -32,7 +32,6 @@
   private static final String X86_SRCSRV = "\\x86\\srcsrv";
 
   @NotNull private final ArtifactsWatcher myArtifactsWatcher;
-  @NotNull private final ArtifactPathHelper myArtifactPathHelper;
 
   @NotNull private final JetSymbolsExe myJetSymbolsExe;
   @NotNull private final Map<File, String> myFileToArtifactMapToProcess = new ConcurrentHashMap<File, String>();
@@ -44,11 +43,9 @@
 
   public SymbolsIndexer(@NotNull final PluginDescriptor pluginDescriptor,
                         @NotNull final EventDispatcher<AgentLifeCycleListener> agentDispatcher,
-                        @NotNull final ArtifactsWatcher artifactsWatcher,
-                        @NotNull final ArtifactPathHelper artifactPathHelper) {
+                        @NotNull final ArtifactsWatcher artifactsWatcher) {
     myArtifactsWatcher = artifactsWatcher;
     myJetSymbolsExe = new JetSymbolsExe(new File(pluginDescriptor.getPluginRoot(), "bin"));
-    myArtifactPathHelper = artifactPathHelper;
 
     agentDispatcher.addListener(new AgentLifeCycleAdapter() {
       @Override
@@ -132,7 +129,7 @@
       try {
         myProgressLogger.message("Indexing sources appeared in file " + pdbFile.getAbsolutePath());
         pdbFilePatcher.patch(pdbFile, myProgressLogger);
-        myFileToArtifactMapToProcess.put(pdbFile, myArtifactPathHelper.concatenateArtifactPath(pdbFiles.get(pdbFile), pdbFile.getName()));
+        myFileToArtifactMapToProcess.put(pdbFile, ArtifactPathHelper.concatenateArtifactPath(pdbFiles.get(pdbFile), pdbFile.getName()));
       } catch (Throwable e) {
         LOG.error("Error occurred while patching symbols file " + pdbFile, e);
         myProgressLogger.error("Error occurred while patching symbols file " + pdbFile);