Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f45e7ad

Browse files
committed
[MSHARED-637] Remove IOException from ProjectDeployer cause it's not thrown by the code
o Fixed duplicated license header ProjectDeployer. o Changed the deploy() method and removed IOException and added IllegalArgumentException git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1794196 13f79535-47bb-0310-9956-ffa450edef68
1 parent 42b685a commit f45e7ad

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/ProjectDeployer.java

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
package org.apache.maven.shared.project.deploy;
22

3-
/*
4-
* Licensed to the Apache Software Foundation (ASF) under one
5-
* or more contributor license agreements. See the NOTICE file
6-
* distributed with this work for additional information
7-
* regarding copyright ownership. The ASF licenses this file
8-
* to you under the Apache License, Version 2.0 (the
9-
* "License"); you may not use this file except in compliance
10-
* with the License. You may obtain a copy of the License at
11-
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
13-
*
14-
* Unless required by applicable law or agreed to in writing,
15-
* software distributed under the License is distributed on an
16-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17-
* KIND, either express or implied. See the License for the
18-
* specific language governing permissions and limitations
19-
* under the License.
20-
*/
21-
22-
import java.io.IOException;
23-
243
/*
254
* Licensed to the Apache Software Foundation (ASF) under one
265
* or more contributor license agreements. See the NOTICE file
@@ -75,12 +54,12 @@ public interface ProjectDeployer
7554
* @param buildingRequest {@link ProjectBuildingRequest}
7655
* @param request {@link ProjectDeployerRequest}
7756
* @param artifactRepository {@link ArtifactRepository}
78-
* @throws IOException In case of problems related to checksums.
7957
* @throws NoFileAssignedException In case of missing file which has not been assigned to project.
58+
* @throws IllegalArgumentException in case of artifact is not correctly assigned.
8059
*/
81-
//FIXME: Need to check to remove IOException cause it looks like it's not being thrown by code.
8260
void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request,
8361
ArtifactRepository artifactRepository )
84-
throws IOException, NoFileAssignedException;
62+
throws NoFileAssignedException, IllegalArgumentException;
63+
8564

8665
}

maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
*/
2121

2222
import java.io.File;
23-
import java.io.IOException;
2423
import java.util.ArrayList;
2524
import java.util.Collection;
2625
import java.util.List;
@@ -66,7 +65,7 @@ public class DefaultProjectDeployer
6665
*/
6766
public void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request,
6867
ArtifactRepository artifactRepository )
69-
throws IOException, NoFileAssignedException
68+
throws NoFileAssignedException, IllegalArgumentException
7069
{
7170

7271
Artifact artifact = request.getProject().getArtifact();

0 commit comments

Comments
 (0)