Skip to content

Commit

Permalink
Simplify projectHasAlreadySetAnArtifact in AbstractJarMojo
Browse files Browse the repository at this point in the history
Inverting this test leads to a more readable flow.
  • Loading branch information
rhowe committed Aug 11, 2022
1 parent 36d794f commit 4d02802
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -322,14 +322,12 @@ public void execute()

private boolean projectHasAlreadySetAnArtifact()
{
if ( getProject().getArtifact().getFile() != null )
{
return getProject().getArtifact().getFile().isFile();
}
else
if ( getProject().getArtifact().getFile() == null )
{
return false;
}

return getProject().getArtifact().getFile().isFile();
}

/**
Expand Down

0 comments on commit 4d02802

Please sign in to comment.