Skip to content

Commit

Permalink
Remove unnecessary 'private' modifier on enum constructors
Browse files Browse the repository at this point in the history
Closes #1102
  • Loading branch information
joelittlejohn committed Apr 2, 2021
1 parent d437f2f commit f878c67
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.sun.codemodel.ClassType;
import com.sun.codemodel.JAnnotationUse;
import com.sun.codemodel.JBlock;
import com.sun.codemodel.JClass;
import com.sun.codemodel.JClassAlreadyExistsException;
Expand Down Expand Up @@ -373,7 +372,7 @@ protected JFieldVar addConstructorAndFields(EnumDefinition enumDefinition, JDefi
JType backingType = enumDefinition.getBackingType();
JFieldVar valueField = _enum.field(JMod.PRIVATE | JMod.FINAL, backingType, VALUE_FIELD_NAME);

JMethod constructor = _enum.constructor(JMod.PRIVATE);
JMethod constructor = _enum.constructor(JMod.NONE);
JVar valueParam = constructor.param(backingType, VALUE_FIELD_NAME);
JBlock body = constructor.body();
body.assign(JExpr._this().ref(valueField), valueParam);
Expand Down

0 comments on commit f878c67

Please sign in to comment.