Skip to content

Commit

Permalink
Rename method getInstance to createInstance in BinaryOperator interfa…
Browse files Browse the repository at this point in the history
…ce (#521)
  • Loading branch information
ebussieres committed Oct 27, 2022
1 parent 996a4de commit 9d7dc0b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/src/orchid/resources/changelog/v3_2_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ version: '3.2.0'

- Add support for spring framework 6 and spring-boot 3 (#630)
- Bump minimum supported java version to 17 in pebble-spring6 and pebble-spring-boot-starter in order to work with spring (#630)
- Change default suffix to .peb instead of .pebble in spring boot autoconfiguration (#553)
- **BREAKING CHANGE**: Change default suffix to .peb instead of .pebble in spring boot autoconfiguration (#553)
- **BREAKING CHANGE**: Rename method getInstance to createInstance in BinaryOperator interface (#521)
2 changes: 1 addition & 1 deletion docs/src/orchid/resources/wiki/guide/extending-pebble.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public class AdditionOperator implements BinaryOperator {
return "+";
}

public BinaryExpression<?> getInstance() {
public BinaryExpression<?> createInstance() {
return new AddExpression();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface BinaryOperator {

String getSymbol();

BinaryExpression<?> getInstance();
BinaryExpression<?> createInstance();

BinaryOperatorType getType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String getSymbol() {
}

@Override
public BinaryExpression<?> getInstance() {
public BinaryExpression<?> createInstance() {
return this.nodeSupplier.get();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ else if (operator.getType() == BinaryOperatorType.TEST) {
BinaryExpression<?> finalExpression;

try {
finalExpression = operator.getInstance();
finalExpression = operator.createInstance();
} catch (RuntimeException e) {
throw new ParserException(e,
"Error instantiating operator node",
Expand Down

0 comments on commit 9d7dc0b

Please sign in to comment.