Skip to content

Commit

Permalink
fix for StringIndexOutOfBoundsException in template getProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
renat-nosto committed Jan 13, 2022
1 parent 0f0c4ae commit a82f44d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework/src/play/templates/GroovyTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ public void init(GroovyTemplate t) {

@Override
public Object getProperty(String property) {
if(property == null || property.isEmpty()) {
// Groovy throws java.lang.StringIndexOutOfBoundsException: String index out of range: 0
// while searching for the property in MetaClass
return null;
}
try {
if (property.equals("actionBridge")) {
return new ActionBridge(this);
Expand Down

0 comments on commit a82f44d

Please sign in to comment.