Skip to content

Commit 1e3fea8

Browse files
committed
refactoring
1 parent f04fecd commit 1e3fea8

File tree

1 file changed

+4
-4
lines changed
  • jbbp-plugins/jbbp-maven/jbbp-maven-plugin/src/main/java/com/igormaznitsa/jbbp/plugin/mvn

1 file changed

+4
-4
lines changed

jbbp-plugins/jbbp-maven/jbbp-maven-plugin/src/main/java/com/igormaznitsa/jbbp/plugin/mvn/AbstractJBBPMojo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.igormaznitsa.jbbp.plugin.common.converters.Target;
44
import com.igormaznitsa.meta.annotation.MustNotContainNull;
5+
import com.igormaznitsa.meta.common.utils.Assertions;
56
import org.apache.maven.plugin.AbstractMojo;
67
import org.apache.maven.plugin.MojoExecutionException;
78
import org.apache.maven.plugin.MojoFailureException;
@@ -56,6 +57,7 @@ public abstract class AbstractJBBPMojo extends AbstractMojo {
5657
protected String packageName;
5758
/**
5859
* Target for translation.
60+
*
5961
* @see Target
6062
*/
6163
@Parameter(alias = "target", defaultValue = "JAVA_1_6")
@@ -119,8 +121,7 @@ public File getSource() {
119121
}
120122

121123
public void setSource(@Nonnull final File file) {
122-
if (file == null) throw new NullPointerException("File must not be null");
123-
this.source = file;
124+
this.source = Assertions.assertNotNull("Source must not be null", file);
124125
}
125126

126127
public boolean getSkip() {
@@ -131,8 +132,7 @@ public void setSkip(final boolean value) {
131132
this.skip = value;
132133
}
133134

134-
public void setOutput(@Nonnull final File file) {
135-
if (file == null) throw new NullPointerException("File must not be null");
135+
public void setOutput(@Nullable final File file) {
136136
this.output = file;
137137
}
138138

0 commit comments

Comments
 (0)