Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
generated getter method should return field value but not builder ins…
Browse files Browse the repository at this point in the history
…tance (JodaOrg#221)
  • Loading branch information
troshanin authored and jodastephen committed Jan 26, 2020
1 parent cead750 commit bcfb11c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/joda/beans/gen/BeanGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -1331,8 +1331,7 @@ private void generateBuilderGet() {
addLine(3, "}");
} else {
if (!data.isRootClass()) {
addLine(3, "super.get(propertyName);");
addLine(3, "return this;");
addLine(3, "return super.get(propertyName);");
} else {
data.ensureImport(NoSuchElementException.class);
addLine(3, "throw new NoSuchElementException(\"Unknown property: \" + propertyName);");
Expand Down

0 comments on commit bcfb11c

Please sign in to comment.