Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDEP-923] Extract copyFile method from AbstractDependencyMojo #389

Merged
merged 4 commits into from May 27, 2024

Conversation

slawekjaranowski
Copy link
Member

this method is only needed in CopyMojo and CopyDependenciesMojo so it is not needed in AbstractDependencyMojo

@@ -80,7 +80,7 @@ public void assertNoMarkerFile(Artifact artifact) throws MojoExecutionException
assertFalse(handle.isMarkerSet());
}

public void testCopyFile() throws MojoExecutionException, IOException {
public void testCopyFile() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did this change to throw a raw exception? Otherwise it's better to declare the actual exceptions instead of the common superclass.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a Unit Test ... all other methods simply throws Exception

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to know when an exception is added or removed from an API, and I'd make the same comment about the other methods in this class. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, one exception is new in 3.7.0 but one is old from copied class - so should I discovered versions for original class or add since now

this method is only needed in CopyMojo and CopyDependenciesMojo
so it is not needed in AbstractDependencyMojo
@@ -80,7 +80,7 @@ public void assertNoMarkerFile(Artifact artifact) throws MojoExecutionException
assertFalse(handle.isMarkerSet());
}

public void testCopyFile() throws MojoExecutionException, IOException {
public void testCopyFile() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to know when an exception is added or removed from an API, and I'd make the same comment about the other methods in this class. :-)

@slawekjaranowski slawekjaranowski merged commit c0e8949 into master May 27, 2024
49 checks passed
@slawekjaranowski slawekjaranowski deleted the MDEP-923-copyFile branch May 27, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants