File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
main/java/com/igormaznitsa/jbbp/compiler/conversion
test/java/com/igormaznitsa/jbbp/compiler/conversion Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -414,8 +414,7 @@ private String makeAnonymousStructName() {
414414 }
415415
416416 private String makeModifier (final JBBPNamedFieldInfo nullableNameFieldInfo ) {
417- if (this .builder .doGettersSetters ) return "private" ;
418- return nullableNameFieldInfo == null ? "protected" : "public" ;
417+ return nullableNameFieldInfo == null || this .builder .doGettersSetters ? "protected" : "public" ;
419418 }
420419
421420 @ Override
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public void testGettersSetters() throws Exception {
9898 text = JBBPToJava6Converter .makeBuilder (parser ).setDoGettersSetters (true ).setClassName (CLASS_NAME ).build ().convert ();
9999
100100 assertFalse (text .contains ("public byte a;" ));
101- assertTrue (text .contains ("private byte a;" ));
101+ assertTrue (text .contains ("protected byte a;" ));
102102 assertTrue (text .contains ("public void setA(byte value) {" ));
103103 assertTrue (text .contains ("public byte getA() {" ));
104104 }
You can’t perform that action at this time.
0 commit comments