@@ -72,28 +72,20 @@ public Reader getTemplateReader(String name) {
72
72
* @return String Full template file path
73
73
*/
74
74
public String getFullTemplateFile (CodegenConfig config , String templateFile ) {
75
- String library = config .getLibrary ();
76
- if (library != null && !"" .equals (library )) {
77
- String libTemplateFile = config .templateDir () + File .separator +
78
- "libraries" + File .separator + library + File .separator +
79
- templateFile ;
80
-
81
- if (new File (libTemplateFile ).exists ()) {
82
- return libTemplateFile ;
83
- }
84
-
85
- libTemplateFile = config .embeddedTemplateDir () + File .separator +
86
- "libraries" + File .separator + library + File .separator +
87
- templateFile ;
88
- if (embeddedTemplateExists (libTemplateFile )) {
89
- // Fall back to the template file embedded/packaged in the JAR file...
90
- return libTemplateFile ;
91
- }
92
- }
93
75
String template = config .templateDir () + File .separator + templateFile ;
94
76
if (new File (template ).exists ()) {
95
77
return template ;
96
78
} else {
79
+ String library = config .getLibrary ();
80
+ if (library != null && !"" .equals (library )) {
81
+ String libTemplateFile = config .embeddedTemplateDir () + File .separator +
82
+ "libraries" + File .separator + library + File .separator +
83
+ templateFile ;
84
+ if (embeddedTemplateExists (libTemplateFile )) {
85
+ // Fall back to the template file embedded/packaged in the JAR file...
86
+ return libTemplateFile ;
87
+ }
88
+ }
97
89
// Fall back to the template file embedded/packaged in the JAR file...
98
90
return config .embeddedTemplateDir () + File .separator + templateFile ;
99
91
}
0 commit comments