Skip to content

Commit b5afcf3

Browse files
authored
Support java source property being discovered as 1.x (#416)
1 parent 1ca6d58 commit b5afcf3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modello-maven-plugin/src/main/java/org/codehaus/modello/maven/AbstractModelloSourceGeneratorMojo.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,12 @@ protected void customizeParameters(Properties parameters) {
9494
parameters.setProperty(ModelloParameterConstants.ENCODING, encoding);
9595
}
9696

97-
if (javaSource != null) {
98-
if (javaSource.startsWith("1.")) {
99-
javaSource = javaSource.substring("1.".length());
100-
}
101-
} else {
97+
if (javaSource == null) {
10298
javaSource = discoverJavaSource();
10399
}
100+
if (javaSource.startsWith("1.")) {
101+
javaSource = javaSource.substring("1.".length());
102+
}
104103
getLog().debug("javaSource=" + javaSource);
105104
parameters.setProperty(ModelloParameterConstants.OUTPUT_JAVA_SOURCE, javaSource);
106105

0 commit comments

Comments
 (0)