Author: hboutemy Date: Fri Feb 20 00:37:19 2009 New Revision: 746071 URL: http://svn.apache.org/viewvc?rev=746071&view=rev Log: o added generics on DependencyProcessor o fixed code style
Modified: maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessor.java maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessorException.java maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReader.java maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReaderException.java Modified: maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessor.java URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessor.java?rev=746071&r1=746070&r2=746071&view=diff ============================================================================== --- maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessor.java (original) +++ maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessor.java Fri Feb 20 00:37:19 2009 @@ -6,9 +6,9 @@ * 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 @@ -25,21 +25,18 @@ public interface DependencyProcessor { - - public static final DependencyProcessor NULL_PROCESSOR = - new DependencyProcessor() { - public List<ArtifactBasicMetadata> getDependencies( - ArtifactBasicMetadata bmd - , MetadataReader mdReader - , Map env - , Map sysProps - ) - throws MetadataReaderException, DependencyProcessorException - { - return null; - } - }; - public List<ArtifactBasicMetadata> getDependencies( ArtifactBasicMetadata bmd, MetadataReader mdReader, Map env, Map sysProps ) - throws MetadataReaderException, DependencyProcessorException; + public static final DependencyProcessor NULL_PROCESSOR = new DependencyProcessor() + { + public List<ArtifactBasicMetadata> getDependencies( ArtifactBasicMetadata bmd, MetadataReader mdReader, + Map<String, String> env, Map<String, String> sysProps ) + throws MetadataReaderException, DependencyProcessorException + { + return null; + } + }; + + public List<ArtifactBasicMetadata> getDependencies( ArtifactBasicMetadata bmd, MetadataReader mdReader, + Map<String, String> env, Map<String, String> sysProps ) + throws MetadataReaderException, DependencyProcessorException; } Modified: maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessorException.java URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessorException.java?rev=746071&r1=746070&r2=746071&view=diff ============================================================================== --- maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessorException.java (original) +++ maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/DependencyProcessorException.java Fri Feb 20 00:37:19 2009 @@ -6,9 +6,9 @@ * 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 @@ -26,39 +26,40 @@ * */ public class DependencyProcessorException -extends Exception + extends Exception { + private static final long serialVersionUID = -2956563106663149486L; - /** - * - */ - public DependencyProcessorException() - { - } - - /** - * @param message - */ - public DependencyProcessorException( String message ) - { - super( message ); - } - - /** - * @param cause - */ - public DependencyProcessorException( Throwable cause ) - { - super( cause ); - } - - /** - * @param message - * @param cause - */ - public DependencyProcessorException( String message, Throwable cause ) - { - super( message, cause ); - } + /** + * + */ + public DependencyProcessorException() + { + } + + /** + * @param message + */ + public DependencyProcessorException( String message ) + { + super( message ); + } + + /** + * @param cause + */ + public DependencyProcessorException( Throwable cause ) + { + super( cause ); + } + + /** + * @param message + * @param cause + */ + public DependencyProcessorException( String message, Throwable cause ) + { + super( message, cause ); + } } Modified: maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReader.java URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReader.java?rev=746071&r1=746070&r2=746071&view=diff ============================================================================== --- maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReader.java (original) +++ maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReader.java Fri Feb 20 00:37:19 2009 @@ -6,9 +6,9 @@ * 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 @@ -30,34 +30,34 @@ */ public interface MetadataReader { - /** - * read raw content pointed by bmd, possibly modified by classifier and type - * - * @param bmd coordinates - * @param classifier - replaces the getClassifier() from bmd if not null - * @param type - replaces the getType() from bmd if not null - * @param exempt - if this read should be exempt from stream verification, default - false - * @return - * @throws MetadataReaderException - * @throws RepositoryException - */ - public byte [] readRawData( ArtifactBasicMetadata bmd, String classifier, String type, boolean exempt ) - throws MetadataReaderException; + /** + * read raw content pointed by bmd, possibly modified by classifier and type + * + * @param bmd coordinates + * @param classifier - replaces the getClassifier() from bmd if not null + * @param type - replaces the getType() from bmd if not null + * @param exempt - if this read should be exempt from stream verification, default - false + * @return + * @throws MetadataReaderException + * @throws RepositoryException + */ + public byte[] readRawData( ArtifactBasicMetadata bmd, String classifier, String type, boolean exempt ) + throws MetadataReaderException; - public byte [] readRawData( ArtifactBasicMetadata bmd, String classifier, String type ) - throws MetadataReaderException; + public byte[] readRawData( ArtifactBasicMetadata bmd, String classifier, String type ) + throws MetadataReaderException; /** - * read metadata for the artifact, pointed by bmd. It will return POM bytes regardless of actual bmd type - * - * @param bmd metadata to read - * @param exempt - if this read should be exempt from stream verification, default - false - * @return - * @throws MetadataReaderException - */ - public byte [] readMetadata( ArtifactBasicMetadata bmd, boolean exempt ) - throws MetadataReaderException; + * read metadata for the artifact, pointed by bmd. It will return POM bytes regardless of actual bmd type + * + * @param bmd metadata to read + * @param exempt - if this read should be exempt from stream verification, default - false + * @return + * @throws MetadataReaderException + */ + public byte[] readMetadata( ArtifactBasicMetadata bmd, boolean exempt ) + throws MetadataReaderException; - public byte [] readMetadata( ArtifactBasicMetadata bmd ) - throws MetadataReaderException; + public byte[] readMetadata( ArtifactBasicMetadata bmd ) + throws MetadataReaderException; } Modified: maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReaderException.java URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReaderException.java?rev=746071&r1=746070&r2=746071&view=diff ============================================================================== --- maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReaderException.java (original) +++ maven/mercury/trunk/mercury-external/src/main/java/org/apache/maven/mercury/builder/api/MetadataReaderException.java Fri Feb 20 00:37:19 2009 @@ -6,9 +6,9 @@ * 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 @@ -28,37 +28,38 @@ public class MetadataReaderException extends Exception { + private static final long serialVersionUID = 3693299588183676110L; - /** - * - */ - public MetadataReaderException() - { - } - - /** - * @param message - */ - public MetadataReaderException( String message ) - { - super( message ); - } - - /** - * @param cause - */ - public MetadataReaderException( Throwable cause ) - { - super( cause ); - } - - /** - * @param message - * @param cause - */ - public MetadataReaderException( String message, Throwable cause ) - { - super( message, cause ); - } + /** + * + */ + public MetadataReaderException() + { + } + + /** + * @param message + */ + public MetadataReaderException( String message ) + { + super( message ); + } + + /** + * @param cause + */ + public MetadataReaderException( Throwable cause ) + { + super( cause ); + } + + /** + * @param message + * @param cause + */ + public MetadataReaderException( String message, Throwable cause ) + { + super( message, cause ); + } }