ArchivaArtifact artifact = (ArchivaArtifact) dumps.get( "archiva-common" );
File dumpFile = getDumpFile( artifact );
- return BytecodeRecordLoader.loadRecord( dumpFile, artifact );
+ BytecodeRecord record = BytecodeRecordLoader.loadRecord( dumpFile, artifact );
+ record.setRepositoryId( "test-repo" );
+ return record;
}
}
* under the License.
*/
+import junit.framework.AssertionFailedError;
import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArchivaArtifactJavaDetails;
import org.apache.maven.archiva.model.platform.JavaArtifactHelper;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.AssertionFailedError;
/**
* BytecodeRecordLoader - Utility method for loading dump files into BytecordRecords.
*/
public class BytecodeRecordLoader
{
- private static Map cache = new HashMap();
+// private static Map cache = new HashMap();
public static BytecodeRecord loadRecord( File dumpFile, ArchivaArtifact artifact )
{
- BytecodeRecord record = (BytecodeRecord) cache.get( artifact );
- if ( record != null )
- {
- return record;
- }
+ BytecodeRecord record;
+// record = (BytecodeRecord) cache.get( artifact );
+// if ( record != null )
+// {
+// return record;
+// }
record = new BytecodeRecord();
record.setArtifact( artifact );
IOUtil.close( freader );
}
- cache.put( artifact, record );
+// cache.put( artifact, record );
return record;
}