#1738 - Refactor toArray() plus various

This commit is contained in:
rob bygrave
2019-06-29 00:40:16 +12:00
parent 7fa5e2aa8c
commit ddf200ffdd
33 changed files with 50 additions and 53 deletions
@@ -58,13 +58,12 @@ public class ElPropertyChainBuilder {
* Build the immutable ElGetChain from the build information.
*/
public ElPropertyChain build() {
return new ElPropertyChain(containsMany, embedded, expression, chain.toArray(new ElPropertyValue[chain.size()]));
return new ElPropertyChain(containsMany, embedded, expression, chain.toArray(new ElPropertyValue[0]));
}
/**
* Permits to set whole chain as embedded when the leaf is embedded
* @param embedded
*/
*/
public void setEmbedded(boolean embedded) {
this.embedded = embedded;
}