diff options
author | Brett Porter <brett@apache.org> | 2008-02-25 14:22:54 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2008-02-25 14:22:54 +0000 |
commit | 056b02a968c7092dae4bd14eda70e8d7d0f90e95 (patch) | |
tree | 8726b75be3d9c2f9432cad001b4de969899ef65e /archiva-base | |
parent | dcaeec7ff78f70f81243fb7b24c1d740fd748adb (diff) | |
download | archiva-056b02a968c7092dae4bd14eda70e8d7d0f90e95.tar.gz archiva-056b02a968c7092dae4bd14eda70e8d7d0f90e95.zip |
remove cache that caused BytecodeIndexTest to erroneously pass, fix test
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@630859 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base')
2 files changed, 12 insertions, 12 deletions
diff --git a/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeIndexTest.java b/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeIndexTest.java index a4bba0f41..2fbef172c 100644 --- a/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeIndexTest.java +++ b/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeIndexTest.java @@ -59,6 +59,8 @@ public class BytecodeIndexTest extends AbstractIndexCreationTestCase 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; } } diff --git a/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecordLoader.java b/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecordLoader.java index 2f3ed62b9..4b9ed12f0 100644 --- a/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecordLoader.java +++ b/archiva-base/archiva-indexer/src/test/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecordLoader.java @@ -19,6 +19,7 @@ package org.apache.maven.archiva.indexer.bytecode; * 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; @@ -29,10 +30,6 @@ import java.io.File; 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. @@ -42,15 +39,16 @@ import junit.framework.AssertionFailedError; */ 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 ); @@ -131,7 +129,7 @@ public class BytecodeRecordLoader IOUtil.close( freader ); } - cache.put( artifact, record ); +// cache.put( artifact, record ); return record; } |