lyncode/jtwig — pull request #143 by gered (2014-06-18 22:44:27+00:00)
Title: fix NullPointerException thrown when calling functions accepting varargs...

... parameters when passing null as one or more of the parameters

This is a fix for an issue I noticed today with the 3.0.0-SNAPSHOT version. If you have a custom Jtwig function that has a varargs parameter (e.g. the "concat" function), and you pass in one or more null arguments to that null parameter then you get a NullPointerException when Jtwig tries to resolve the function:

```
java.lang.NullPointerException
at com.lyncode.jtwig.functions.parameters.resolve.impl.ParameterAnnotationResolver.canResolveParameterByPosition(ParameterAnnotationResolver.java:116)
at com.lyncode.jtwig.functions.parameters.resolve.impl.ParameterAnnotationResolver.canResolveParameter(ParameterAnnotationResolver.java:52)
at com.lyncode.jtwig.functions.parameters.resolve.CompiledParameterResolver.resolveParameter(CompiledParameterResolver.java:52)
at com.lyncode.jtwig.functions.parameters.resolve.CompiledParameterResolver.resolveParameters(CompiledParameterResolver.java:79)
at com.lyncode.jtwig.functions.repository.FunctionResolver.get(FunctionResolver.java:71)
at com.lyncode.jtwig.JtwigContext.executeFunction(JtwigContext.java:76)
at com.lyncode.jtwig.expressions.model.FunctionElement$Compiled.calculate(FunctionElement.java:81)
at com.lyncode.jtwig.content.model.compilable.Output$Compiled.render(Output.java:52)
at com.lyncode.jtwig.content.model.compilable.Sequence$Compiled.render(Sequence.java:80)
at com.lyncode.jtwig.parser.JtwigParser$CompiledDocument.render(JtwigParser.java:89)
at com.lyncode.jtwig.acceptance.AbstractJtwigTest.jtwigRenders(AbstractJtwigTest.java:78)
at com.lyncode.jtwig.acceptance.functions.NullVarArgsTest.canExecuteWithNullVarArgsPassed(NullVarArgsTest.java:13)
```

Let me know if you want the tests I added organized differently.