Skip to content

Commit

Permalink
Replaced leftPadded on direct append
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegDokuka committed Oct 23, 2024
1 parent 8218d37 commit fb924e7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,10 @@ public J visitEnumValue(J.EnumValue enum_, PrintOutputCapture<P> p) {
J.NewClass initializer = enum_.getInitializer();
if (initializer != null) {
visitSpace(initializer.getPrefix(), Space.Location.NEW_CLASS_PREFIX, p);
p.append("=");
// there can be only one argument
Expression expression = initializer.getArguments().get(0);
visitLeftPadded("=", JLeftPadded.build(expression), JLeftPadded.Location.VARIABLE_INITIALIZER, p);
visit(expression, p);
return enum_;
}

Expand Down

0 comments on commit fb924e7

Please sign in to comment.