From d33fec6d3e687566cce1b17d2a774961f4e7848f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Cserven=C3=A1k?= Date: Mon, 13 Aug 2012 12:09:42 +0000 Subject: [PATCH] Getting rid of deprecated baggage. git-svn-id: https://svn.apache.org/repos/asf/maven/indexer/trunk@1372382 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/index/artifact/Gav.java | 27 ------------ .../maven/index/artifact/GavCalculator.java | 6 +-- .../IllegalArtifactCoordinateException.java | 42 ------------------- .../index/artifact/M2GavCalculatorTest.java | 1 - 4 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 indexer-artifact/src/main/java/org/apache/maven/index/artifact/IllegalArtifactCoordinateException.java diff --git a/indexer-artifact/src/main/java/org/apache/maven/index/artifact/Gav.java b/indexer-artifact/src/main/java/org/apache/maven/index/artifact/Gav.java index bf788ffe..d7c2d593 100644 --- a/indexer-artifact/src/main/java/org/apache/maven/index/artifact/Gav.java +++ b/indexer-artifact/src/main/java/org/apache/maven/index/artifact/Gav.java @@ -93,33 +93,6 @@ public Gav( String groupId, String artifactId, String version ) this( groupId, artifactId, version, null, null, null, null, null, false, null, false, null ); } - /** - * Deprecated constructor, left here for backward compatibility. It simply delegates to other constructor and - * neglects the snapshot redundant parameter. - * - * @deprecated The boolean snapshot parameter is simply neglected. Use the constructor without it. - * @param groupId - * @param artifactId - * @param version - * @param classifier - * @param extension - * @param snapshotBuildNumber - * @param snapshotTimeStamp - * @param name - * @param snapshot - * @param hash - * @param hashType - * @param signature - * @param signatureType - */ - public Gav( String groupId, String artifactId, String version, String classifier, String extension, - Integer snapshotBuildNumber, Long snapshotTimeStamp, String name, boolean snapshot, boolean hash, - HashType hashType, boolean signature, SignatureType signatureType ) - { - this( groupId, artifactId, version, classifier, extension, snapshotBuildNumber, snapshotTimeStamp, name, hash, - hashType, signature, signatureType ); - } - public Gav( String groupId, String artifactId, String version, String classifier, String extension, Integer snapshotBuildNumber, Long snapshotTimeStamp, String name, boolean hash, HashType hashType, boolean signature, SignatureType signatureType ) diff --git a/indexer-artifact/src/main/java/org/apache/maven/index/artifact/GavCalculator.java b/indexer-artifact/src/main/java/org/apache/maven/index/artifact/GavCalculator.java index 2813c6c5..3e674f42 100644 --- a/indexer-artifact/src/main/java/org/apache/maven/index/artifact/GavCalculator.java +++ b/indexer-artifact/src/main/java/org/apache/maven/index/artifact/GavCalculator.java @@ -31,14 +31,12 @@ public interface GavCalculator * Calculates GAV from provided repository path. The path has to be absolute starting from repository root. * If path represents a proper artifact path (conforming to given layout), GAV is "calculated" from it and is * returned. If path represents some file that is not an artifact, but is part of the repository layout (like - * maven-metadata.xml), or in any other case it returns null. TODO: some place for different levels of "validation"? + * maven-metadata.xml), or in any other case it returns null. * * @param path the repository path * @return Gav parsed from the path - * @throws IllegalArtifactCoordinateException not throwing it anymore, here just for backward compatibility. */ - Gav pathToGav( String path ) - throws IllegalArtifactCoordinateException; + Gav pathToGav( String path ); /** * Reassembles the repository path from the supplied GAV. It will be an absolute path. diff --git a/indexer-artifact/src/main/java/org/apache/maven/index/artifact/IllegalArtifactCoordinateException.java b/indexer-artifact/src/main/java/org/apache/maven/index/artifact/IllegalArtifactCoordinateException.java deleted file mode 100644 index ab283770..00000000 --- a/indexer-artifact/src/main/java/org/apache/maven/index/artifact/IllegalArtifactCoordinateException.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.apache.maven.index.artifact; - -/* - * 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. - */ - -/** - * Deprecated exception, just made into Runtime exception but NEVER THROWN anymore (since 4.0.1), - * - * @author cstamas - * @deprecated Not throwed anymore. - */ -public class IllegalArtifactCoordinateException - extends RuntimeException -{ - private static final long serialVersionUID = 7137593998855995199L; - - public IllegalArtifactCoordinateException( String message ) - { - super( message ); - } - - public IllegalArtifactCoordinateException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/indexer-artifact/src/test/java/org/apache/maven/index/artifact/M2GavCalculatorTest.java b/indexer-artifact/src/test/java/org/apache/maven/index/artifact/M2GavCalculatorTest.java index e34fe0b8..08810103 100644 --- a/indexer-artifact/src/test/java/org/apache/maven/index/artifact/M2GavCalculatorTest.java +++ b/indexer-artifact/src/test/java/org/apache/maven/index/artifact/M2GavCalculatorTest.java @@ -571,7 +571,6 @@ public void testNegGav() throws Exception { Gav gav; - String path; // NEXUS-4132 gav =