Skip to content

Commit

Permalink
Fix case when null is in the defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
sschr15 committed Aug 18, 2024
1 parent 11236de commit ade4079
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/org/jetbrains/java/decompiler/api/DecompilerOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,16 @@ private static void addOptions(List<Field> fields, List<DecompilerOption> option
String friendlyName = name.value();
String friendlyDescription = description.value();
Type friendlyType = type.value();
String defaultValue = defaults.containsKey(paramName) ? defaults.get(paramName).toString() : null;
Object defaultValue = defaults.get(paramName);
String defaultValueString = defaultValue != null ? defaultValue.toString() : null;

options.add(new DecompilerOption(
paramName,
friendlyName,
friendlyDescription,
friendlyType,
plugin != null ? plugin.id() : null,
defaultValue
defaultValueString
));
}
}
Expand Down

0 comments on commit ade4079

Please sign in to comment.