From 8b9ec9fa8831710c03b433d41ba88a6ca83998b5 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Tue, 8 Jul 2008 08:44:21 +0000 Subject: [PATCH] [MRM-730] -used bcel to read the .class files -index classnames (packagename already included here) and methods that are public -added tests git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@674740 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-lucene-consumers/pom.xml | 7 +- .../IndexJavaPublicMethodsConsumer.java | 191 +++++++++++++++- .../IndexJavaPublicMethodsConsumerTest.java | 124 ++++++++++ ...avaPublicMethodsCrossRepositorySearch.java | 216 ++++++++++++++++++ .../IndexJavaPublicMethodsConsumerTest.xml | 64 ++++++ .../archiva-index-methods-jar-test-1.0.jar | Bin 0 -> 4460 bytes .../1.0/pom.xml | 18 ++ .../indexer/bytecode/BytecodeRecord.java | 18 +- 8 files changed, 620 insertions(+), 18 deletions(-) create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.java create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsCrossRepositorySearch.java create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.xml create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/test-repo/org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar create mode 100644 archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/test-repo/org/apache/archiva/archiva-index-methods-jar-test/1.0/pom.xml diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml index 02702cdcb..56e38b751 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml @@ -49,6 +49,11 @@ org.codehaus.plexus plexus-spring test - + + + org.apache.bcel + bcel + 5.2 + diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumer.java index 9f04c61d7..755755225 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumer.java @@ -22,14 +22,34 @@ package org.apache.maven.archiva.consumers.lucene; import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer; import org.apache.maven.archiva.consumers.ConsumerException; import org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer; +import org.apache.maven.archiva.indexer.RepositoryContentIndex; +import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory; +import org.apache.maven.archiva.indexer.RepositoryIndexException; +import org.apache.maven.archiva.indexer.bytecode.BytecodeRecord; import org.apache.maven.archiva.model.ArchivaArtifact; +import org.apache.maven.archiva.repository.ManagedRepositoryContent; +import org.apache.maven.archiva.repository.RepositoryContentFactory; +import org.apache.maven.archiva.repository.RepositoryException; +import com.sun.org.apache.bcel.internal.classfile.ClassParser; +import com.sun.org.apache.bcel.internal.classfile.JavaClass; +import com.sun.org.apache.bcel.internal.classfile.Method; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; /** * IndexJavaPublicMethodsConsumer * * @author Joakim Erdfelt + * Maria Odea Ching * @version $Id$ * * @plexus.component role="org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer" @@ -49,11 +69,40 @@ public class IndexJavaPublicMethodsConsumer * @plexus.configuration default-value="Index the java public methods for Full Text Search." */ private String description; + + /** + * @plexus.requirement role-hint="lucene" + */ + private RepositoryContentIndexFactory repoIndexFactory; + + /** + * @plexus.requirement + */ + private RepositoryContentFactory repoFactory; + + private static final String CLASSES = "classes"; + + private static final String METHODS = "methods"; + + private List includes = new ArrayList(); + public IndexJavaPublicMethodsConsumer() + { + includes.add( "jar" ); + includes.add( "war" ); + includes.add( "ear" ); + includes.add( "zip" ); + includes.add( "tar.gz" ); + includes.add( "tar.bz2" ); + includes.add( "car" ); + includes.add( "sar" ); + includes.add( "mar" ); + includes.add( "rar" ); + } + public void beginScan() { - // TODO Auto-generated method stub - + // TODO Auto-generated method stubx } public void completeScan() @@ -63,16 +112,58 @@ public class IndexJavaPublicMethodsConsumer } public List getIncludedTypes() - { - // TODO Auto-generated method stub - return null; + { + return includes; } public void processArchivaArtifact( ArchivaArtifact artifact ) throws ConsumerException - { - // TODO Auto-generated method stub - + { + try + { + ManagedRepositoryContent repoContent = + repoFactory.getManagedRepositoryContent( artifact.getModel().getRepositoryId() ); + File file = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) ); + + if( file.getAbsolutePath().endsWith( ".jar" ) || file.getAbsolutePath().endsWith( ".war" ) || + file.getAbsolutePath().endsWith( ".ear" ) || file.getAbsolutePath().endsWith( ".zip" ) || + file.getAbsolutePath().endsWith( ".tar.gz" ) || file.getAbsolutePath().endsWith( ".tar.bz2" ) || + file.getAbsolutePath().endsWith( ".car" ) || file.getAbsolutePath().endsWith( ".sar" ) || + file.getAbsolutePath().endsWith( ".mar" ) || file.getAbsolutePath().endsWith( ".rar" ) ) + { + + if( file.exists() ) + { + List files = readFilesInArchive( file ); + Map> mapOfClassesAndMethods = + getPublicClassesAndMethodsFromFiles( file.getAbsolutePath(), files ); + + // NOTE: what about public variables? should these be indexed too? + RepositoryContentIndex bytecodeIndex = repoIndexFactory.createBytecodeIndex( repoContent.getRepository() ); + + BytecodeRecord bytecodeRecord = new BytecodeRecord(); + bytecodeRecord.setFilename( file.getName() ); + bytecodeRecord.setClasses( mapOfClassesAndMethods.get( CLASSES ) ); + bytecodeRecord.setFiles( files ); + bytecodeRecord.setMethods( mapOfClassesAndMethods.get( METHODS ) ); + bytecodeRecord.setArtifact( artifact ); + bytecodeRecord.setRepositoryId( artifact.getModel().getRepositoryId() ); + bytecodeIndex.modifyRecord( bytecodeRecord ); + } + } + } + catch ( RepositoryException e ) + { + throw new ConsumerException( "Can't run index cleanup consumer: " + e.getMessage() ); + } + catch ( RepositoryIndexException e ) + { + throw new ConsumerException( "Error encountered while adding artifact to index: " + e.getMessage() ); + } + catch ( IOException e ) + { + throw new ConsumerException( "Error encountered while getting file contents: " + e.getMessage() ); + } } public String getDescription() @@ -89,5 +180,89 @@ public class IndexJavaPublicMethodsConsumer { return false; } + + private List readFilesInArchive( File file ) + throws IOException + { + ZipFile zipFile = new ZipFile( file ); + List files; + + try + { + files = new ArrayList( zipFile.size() ); + for ( Enumeration entries = zipFile.entries(); entries.hasMoreElements(); ) + { + ZipEntry entry = (ZipEntry) entries.nextElement(); + files.add( entry.getName() ); + } + } + finally + { + closeQuietly( zipFile ); + } + return files; + } + + private void closeQuietly( ZipFile zipFile ) + { + try + { + if ( zipFile != null ) + { + zipFile.close(); + } + } + catch ( IOException e ) + { + // ignored + } + } + + private static boolean isClass( String name ) + { + return name.endsWith( ".class" ) && name.lastIndexOf( "$" ) < 0; + } + + private Map> getPublicClassesAndMethodsFromFiles( String zipFile, List files ) + { + Map> map = new HashMap>(); + List methods = new ArrayList(); + List classes = new ArrayList(); + + for( String file : files ) + { + if( isClass( file ) ) + { + try + { + ClassParser parser = new ClassParser( zipFile, file ); + JavaClass javaClass = parser.parse(); + + if( javaClass.isPublic() ) + { + classes.add( javaClass.getClassName() ); + } + + Method[] methodsArr = javaClass.getMethods(); + for( Method method : methodsArr ) + { + if( method.isPublic() ) + { + methods.add( method.getName() ); + } + } + } + catch ( IOException e ) + { + // ignore + } + } + } + + map.put( CLASSES, classes ); + map.put( METHODS, methods ); + + return map; + } } diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.java new file mode 100644 index 000000000..83ae9588b --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.java @@ -0,0 +1,124 @@ +package org.apache.maven.archiva.consumers.lucene; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.ArrayList; +import java.util.List; + +import org.apache.maven.archiva.configuration.ArchivaConfiguration; +import org.apache.maven.archiva.configuration.Configuration; +import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer; +import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory; +import org.apache.maven.archiva.indexer.search.SearchResultLimits; +import org.apache.maven.archiva.indexer.search.SearchResults; +import org.apache.maven.archiva.model.ArchivaArtifact; +import org.apache.maven.archiva.model.ArchivaArtifactModel; +import org.codehaus.plexus.spring.PlexusInSpringTestCase; + +/** + * + * @author Maria Odea Ching + * @version + * + */ +public class IndexJavaPublicMethodsConsumerTest + extends PlexusInSpringTestCase +{ + DatabaseUnprocessedArtifactConsumer indexMethodsConsumer; + + IndexJavaPublicMethodsCrossRepositorySearch searcher; + + private RepositoryContentIndexFactory indexFactory; + + public void setUp() + throws Exception + { + super.setUp(); + indexMethodsConsumer = + (DatabaseUnprocessedArtifactConsumer) lookup( DatabaseUnprocessedArtifactConsumer.class, + "index-public-methods" ); + + ManagedRepositoryConfiguration config = new ManagedRepositoryConfiguration(); + config.setId( "test-repo" ); + config.setLayout( "default" ); + config.setLocation( getBasedir() + "/target/test-classes/test-repo" ); + config.setName( "Test Repository" ); + + addRepoToConfiguration( "index-public-methods", config ); + + indexFactory = (RepositoryContentIndexFactory) lookup (RepositoryContentIndexFactory.class, "lucene" ); + searcher = new IndexJavaPublicMethodsCrossRepositorySearch( config, indexFactory ); + } + + private void addRepoToConfiguration( String configHint, ManagedRepositoryConfiguration repoConfiguration ) + throws Exception + { + ArchivaConfiguration archivaConfiguration = + (ArchivaConfiguration) lookup( ArchivaConfiguration.class, configHint ); + Configuration configuration = archivaConfiguration.getConfiguration(); + configuration.removeManagedRepository( configuration.findManagedRepositoryById( repoConfiguration.getId() ) ); + configuration.addManagedRepository( repoConfiguration ); + } + + public void testJarPublicMethods() + throws Exception + { + ArchivaArtifact artifact = + createArtifact( "org.apache.archiva", "archiva-index-methods-jar-test", "1.0", "jar" ); + indexMethodsConsumer.processArchivaArtifact( artifact ); + + List selectedRepos = new ArrayList(); + selectedRepos.add( "test-repo" ); + + // search for class names + SearchResults results = searcher.searchForBytecode( "", selectedRepos, "FirstPackageApp", new SearchResultLimits( 0 ) ); + assertEquals( 1, results.getTotalHits() ); + + results = searcher.searchForBytecode( "", selectedRepos, "SecondPackageApp", new SearchResultLimits( 0 ) ); + assertEquals( 1, results.getTotalHits() ); + + // search for public methods + results = searcher.searchForBytecode( "", selectedRepos, "appMethodOne", new SearchResultLimits( 0 ) ); + assertEquals( 1, results.getTotalHits() ); + + // should return only the overridding public method in SecondPackageApp + results = searcher.searchForBytecode( "", selectedRepos, "protectedMethod", new SearchResultLimits( 0 ) ); + assertEquals( 1, results.getTotalHits() ); + + // should not return any private methods + results = searcher.searchForBytecode( "", selectedRepos, "privMethod", new SearchResultLimits( 0 ) ); + assertEquals( 0, results.getTotalHits() ); + + // test for public variables? + } + + private ArchivaArtifact createArtifact( String groupId, String artifactId, String version, String type ) + { + ArchivaArtifactModel model = new ArchivaArtifactModel(); + model.setGroupId( groupId ); + model.setArtifactId( artifactId ); + model.setVersion( version ); + model.setType( type ); + model.setRepositoryId( "test-repo" ); + + return new ArchivaArtifact( model ); + } +} diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsCrossRepositorySearch.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsCrossRepositorySearch.java new file mode 100644 index 000000000..1794535dd --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsCrossRepositorySearch.java @@ -0,0 +1,216 @@ +package org.apache.maven.archiva.consumers.lucene; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.lucene.document.Document; +import org.apache.lucene.queryParser.ParseException; +import org.apache.lucene.queryParser.QueryParser; +import org.apache.lucene.search.Hits; +import org.apache.lucene.search.MultiSearcher; +import org.apache.lucene.search.Searchable; +import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.maven.archiva.indexer.RepositoryContentIndex; +import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory; +import org.apache.maven.archiva.indexer.RepositoryIndexSearchException; +import org.apache.maven.archiva.indexer.bytecode.BytecodeHandlers; +import org.apache.maven.archiva.indexer.lucene.LuceneEntryConverter; +import org.apache.maven.archiva.indexer.lucene.LuceneQuery; +import org.apache.maven.archiva.indexer.lucene.LuceneRepositoryContentRecord; +import org.apache.maven.archiva.indexer.search.CrossRepositorySearch; +import org.apache.maven.archiva.indexer.search.SearchResultLimits; +import org.apache.maven.archiva.indexer.search.SearchResults; + +/** + * Searcher used for testing purposes only. + * + * @author Maria Odea Ching + * @version + */ +public class IndexJavaPublicMethodsCrossRepositorySearch + implements CrossRepositorySearch +{ + private ManagedRepositoryConfiguration localIndexedRepo; + + private RepositoryContentIndexFactory indexFactory; + + public IndexJavaPublicMethodsCrossRepositorySearch() + { + + } + + public IndexJavaPublicMethodsCrossRepositorySearch( ManagedRepositoryConfiguration localIndexedRepo, RepositoryContentIndexFactory indexFactory ) + { + this.localIndexedRepo = localIndexedRepo; + this.indexFactory = indexFactory; + } + + public SearchResults searchForBytecode( String principal, List selectedRepos, String term, + SearchResultLimits limits ) + { + List indexes = new ArrayList(); + indexes.add( indexFactory.createBytecodeIndex( localIndexedRepo ) ); + + try + { + QueryParser parser = new BytecodeHandlers().getQueryParser(); + LuceneQuery query = new LuceneQuery( parser.parse( term ) ); + SearchResults results = searchAll( query, limits, indexes ); + results.getRepositories().add( localIndexedRepo ); + + return results; + } + catch ( ParseException e ) + { + } + + return new SearchResults(); + } + + public SearchResults searchForChecksum( String principal, List selectedRepos, String checksum, + SearchResultLimits limits ) + { + // TODO Auto-generated method stub + return null; + } + + public SearchResults searchForTerm( String principal, List selectedRepos, String term, + SearchResultLimits limits ) + { + // TODO Auto-generated method stub + return null; + } + + private SearchResults searchAll( LuceneQuery luceneQuery, SearchResultLimits limits, List indexes ) + { + org.apache.lucene.search.Query specificQuery = luceneQuery.getLuceneQuery(); + + SearchResults results = new SearchResults(); + + if ( indexes.isEmpty() ) + { + // No point going any further. + return results; + } + + // Setup the converter + LuceneEntryConverter converter = null; + RepositoryContentIndex index = indexes.get( 0 ); + converter = index.getEntryConverter(); + + // Process indexes into an array of Searchables. + List searchableList = toSearchables( indexes ); + + Searchable searchables[] = new Searchable[searchableList.size()]; + searchableList.toArray( searchables ); + + MultiSearcher searcher = null; + + try + { + // Create a multi-searcher for looking up the information. + searcher = new MultiSearcher( searchables ); + + // Perform the search. + Hits hits = searcher.search( specificQuery ); + + int hitCount = hits.length(); + + // Now process the limits. + results.setLimits( limits ); + results.setTotalHits( hitCount ); + + int fetchCount = limits.getPageSize(); + int offset = ( limits.getSelectedPage() * limits.getPageSize() ); + + if ( limits.getSelectedPage() == SearchResultLimits.ALL_PAGES ) + { + fetchCount = hitCount; + offset = 0; + } + + // Goto offset. + if ( offset < hitCount ) + { + // only process if the offset is within the hit count. + for ( int i = 0; i <= fetchCount; i++ ) + { + // Stop fetching if we are past the total # of available hits. + if ( offset + i >= hitCount ) + { + break; + } + + try + { + Document doc = hits.doc( offset + i ); + LuceneRepositoryContentRecord record = converter.convert( doc ); + results.addHit( record ); + } + catch ( java.text.ParseException e ) + { + + } + } + } + + } + catch ( IOException e ) + { + + } + finally + { + try + { + if ( searcher != null ) + { + searcher.close(); + } + } + catch ( IOException ie ) + { + + } + } + + return results; + } + + private List toSearchables( List indexes ) + { + List searchableList = new ArrayList(); + for ( RepositoryContentIndex contentIndex : indexes ) + { + try + { + searchableList.add( contentIndex.getSearchable() ); + } + catch ( RepositoryIndexSearchException e ) + { + + } + } + return searchableList; + } +} diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.xml new file mode 100644 index 000000000..93f760b56 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/org/apache/maven/archiva/consumers/lucene/IndexJavaPublicMethodsConsumerTest.xml @@ -0,0 +1,64 @@ + + + + + org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer + index-public-methods + org.apache.maven.archiva.consumers.lucene.IndexJavaPublicMethodsConsumer + + + org.apache.maven.archiva.repository.RepositoryContentFactory + index-public-methods + + + org.apache.maven.archiva.indexer.RepositoryContentIndexFactory + lucene + repoIndexFactory + + + + + org.apache.maven.archiva.repository.RepositoryContentFactory + index-public-methods + org.apache.maven.archiva.repository.RepositoryContentFactory + RepositoryContentRequest + + + org.apache.maven.archiva.configuration.ArchivaConfiguration + index-public-methods + archivaConfiguration + + + + + org.apache.maven.archiva.configuration.ArchivaConfiguration + index-public-methods + org.apache.maven.archiva.configuration.DefaultArchivaConfiguration + + + org.codehaus.plexus.registry.Registry + index-public-methods + + + org.apache.maven.archiva.policies.PreDownloadPolicy + prePolicies + + + org.apache.maven.archiva.policies.PostDownloadPolicy + postPolicies + + + + + org.codehaus.plexus.registry.Registry + index-public-methods + org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry + + + + + + + + \ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/test-repo/org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/test-repo/org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar new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5=j`-gC|Td^4>j|!c( z3x4lqpxxsl;A%MPr26&R`5Dl%g)Nog^NBrqWZG#2(k`R_>QtNwPR=+2$qq+^Hp4k; z6}SOZ?_+zZu39Fn+0cjAIr5tMeY-1|rip9QH@LRyJW zbUp7)AJKE^vLjoNa3*GcmR~m|w3X5ZH(-oz=&NqE3S-=)(1qzE%U_CiU-8DDT9#FY zjokvhpI91n#g(+zrS4*Ns_Q!tdVjGr=!jReS2|*)+xRt*-ft`oI*^^_c0U1E-T&7F zqRaU2n{r2E{CLh`fG1#Xy z%VbzEu2-?X5Li{Qz{XI;+O;z-3s#jdP7X^-=;v)n>$_Ksb2(M4p7r`*Pfr%BV2_Pp z+MaAo9lz$&T&DYOJEi}M?;lgivO31eWLaaDKbYq9>( + 4.0.0 + org.apache.archiva + archiva-index-methods-jar-test + jar + 1.0 + archiva-index-methods-jar-test + http://maven.apache.org + + + junit + junit + 3.8.1 + test + + + diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecord.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecord.java index 1cb7422a9..888067da5 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecord.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/bytecode/BytecodeRecord.java @@ -39,28 +39,28 @@ public class BytecodeRecord private String filename; - private List classes; + private List classes; - private List methods; + private List methods; - private List files; + private List files; public ArchivaArtifact getArtifact() { return artifact; } - public List getClasses() + public List getClasses() { return classes; } - public List getFiles() + public List getFiles() { return files; } - public List getMethods() + public List getMethods() { return methods; } @@ -92,17 +92,17 @@ public class BytecodeRecord this.artifact = artifact; } - public void setClasses( List classes ) + public void setClasses( List classes ) { this.classes = classes; } - public void setFiles( List files ) + public void setFiles( List files ) { this.files = files; } - public void setMethods( List methods ) + public void setMethods( List methods ) { this.methods = methods; } -- 2.39.5