@@ -160,7 +160,7 @@ public void execute() throws MojoExecutionException {
160
160
161
161
Set <String > definedOptions = new HashSet <String >();
162
162
for (CliOption langCliOption : config .cliOptions ()) {
163
- definedOptions .add (langCliOption .getOpt ());
163
+ definedOptions .add (langCliOption .getOpt ());
164
164
}
165
165
166
166
if (configOptions != null ) {
@@ -178,15 +178,15 @@ public void execute() throws MojoExecutionException {
178
178
Map <String , String > mappings = createMapFromKeyValuePairs (configOptions .remove ("instantiation-types" ).toString ());
179
179
config .instantiationTypes ().putAll (mappings );
180
180
}
181
- addAdditionalProperties (config , definedOptions , configOptions );
181
+ addAdditionalProperties (config , definedOptions , configOptions );
182
182
}
183
183
184
184
if (null != configurationFile ) {
185
185
Config genConfig = ConfigParser .read (configurationFile );
186
186
if (null != genConfig ) {
187
- addAdditionalProperties (config , definedOptions , genConfig .getOptions ());
187
+ addAdditionalProperties (config , definedOptions , genConfig .getOptions ());
188
188
} else {
189
- throw new RuntimeException ("Unable to read configuration file" );
189
+ throw new RuntimeException ("Unable to read configuration file" );
190
190
}
191
191
}
192
192
@@ -205,8 +205,8 @@ public void execute() throws MojoExecutionException {
205
205
new DefaultGenerator ().opts (input ).generate ();
206
206
} catch (Exception e ) {
207
207
// Maven logs exceptions thrown by plugins only if invoked with -e
208
- // I find it annoying to jump through hoops to get basic diagnostic information,
209
- // so let's log it in any case:
208
+ // I find it annoying to jump through hoops to get basic diagnostic information,
209
+ // so let's log it in any case:
210
210
getLog ().error (e );
211
211
throw new MojoExecutionException ("Code generation failed. See above for the full exception." );
212
212
}
@@ -217,12 +217,12 @@ public void execute() throws MojoExecutionException {
217
217
}
218
218
219
219
private void addAdditionalProperties (CodegenConfig config , Set <String > definedOptions , Map <?,?> configOptions ) {
220
- for (Map .Entry <?, ?> configEntry : configOptions .entrySet ()) {
221
- config .additionalProperties ().put (configEntry .getKey ().toString (), configEntry .getValue ());
222
- if (!definedOptions .contains (configEntry .getKey ())) {
223
- getLog ().warn ("Additional property: " + configEntry .getKey () + " is not defined for this language." );
224
- }
225
- }
220
+ for (Map .Entry <?, ?> configEntry : configOptions .entrySet ()) {
221
+ config .additionalProperties ().put (configEntry .getKey ().toString (), configEntry .getValue ());
222
+ if (!definedOptions .contains (configEntry .getKey ())) {
223
+ getLog ().warn ("Additional property: " + configEntry .getKey () + " is not defined for this language." );
224
+ }
225
+ }
226
226
}
227
227
228
228
private static Map <String , String > createMapFromKeyValuePairs (String commaSeparatedKVPairs ) {
0 commit comments