From: Maria Odea B. Ching Date: Tue, 8 Jul 2008 08:44:21 +0000 (+0000) Subject: [MRM-730] X-Git-Tag: archiva-1.1^2~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8b9ec9fa8831710c03b433d41ba88a6ca83998b5;p=archiva.git [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 --- 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 file mode 100644 index 000000000..cc03dacc1 Binary files /dev/null and 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 differ 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/pom.xml 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/pom.xml new file mode 100644 index 000000000..e7bf54bda --- /dev/null +++ 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/pom.xml @@ -0,0 +1,18 @@ + + 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; }