Skip to content

Commit ddbef8b

Browse files
committed
implemented processOpts to avoid clobbering by superclass
1 parent d2cb05f commit ddbef8b

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/languages/JaxRSServerCodegen.java

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public String getHelp() {
2727
}
2828

2929
public JaxRSServerCodegen() {
30-
super();
30+
super.processOpts();
3131

3232
sourceFolder = "src/gen/java";
3333

@@ -37,7 +37,6 @@ public JaxRSServerCodegen() {
3737
apiTemplateFiles.put("apiService.mustache", ".java");
3838
apiTemplateFiles.put("apiServiceImpl.mustache", ".java");
3939
apiTemplateFiles.put("apiServiceFactory.mustache", ".java");
40-
4140
templateDir = "JavaJaxRS";
4241
apiPackage = System.getProperty( "swagger.codegen.jaxrs.apipackage", "io.swagger.api") ;
4342
modelPackage = System.getProperty( "swagger.codegen.jaxrs.modelpackage", "io.swagger.model" );
@@ -48,6 +47,24 @@ public JaxRSServerCodegen() {
4847
additionalProperties.put("artifactVersion", artifactVersion);
4948
additionalProperties.put("title", title);
5049

50+
51+
languageSpecificPrimitives = new HashSet<String>(
52+
Arrays.asList(
53+
"String",
54+
"boolean",
55+
"Boolean",
56+
"Double",
57+
"Integer",
58+
"Long",
59+
"Float")
60+
);
61+
}
62+
63+
64+
@Override
65+
public void processOpts() {
66+
super.processOpts();
67+
5168
supportingFiles.clear();
5269
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
5370
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
@@ -62,16 +79,6 @@ public JaxRSServerCodegen() {
6279
supportingFiles.add(new SupportingFile("web.mustache",
6380
("src/main/webapp/WEB-INF"), "web.xml"));
6481

65-
languageSpecificPrimitives = new HashSet<String>(
66-
Arrays.asList(
67-
"String",
68-
"boolean",
69-
"Boolean",
70-
"Double",
71-
"Integer",
72-
"Long",
73-
"Float")
74-
);
7582
}
7683

7784
@Override

0 commit comments

Comments
 (0)