Comments (1)
Under the situation that I found it was in the formal arguments at the top of the template.
If an argument in the header is duplicated ex key_protocol it is only entered in the formal arguments 2 times instead of 35 you have 34 arguments. when the formal arguments are added it must reinsert or overwrite the formal arguments. The index gets updated but the size remains the same, local is created based on the size not the index number then when it tries to do any processing it throws an outofbounds error
my_template( attib_1, attrib_2,attrib_3,attrib_2) :: <<
code
st.add("attrib_1","lah,blah) ;
st.add("attrib_2","blah,blah);
you now get an ArrayIndexOutOfBoundsException: 4 error
I see this all over the code new Object[impl.formalArguments.size()]
Actually not a bug unless your someone like me that spent the better part of 2 days resolving the issue but the issue could be trapped better such as throwing an error if the argument has already been added.
from stringtemplate4.
Related Issues (20)
- MapModelAdaptor comparison always fails because it is using “==” instead of value.equals() to compare an Object (value) with a String (DICT_KEY) HOT 2
- Test failure: ClassCastException In DateRenderer HOT 2
- Hidden argument <i> reported as an error when rendering templates HOT 2
- CDATA section HOT 2
- Loading template group from STGroupDir in app running on Tomcat 8 fails HOT 12
- How to pass arguments for indirect template call? HOT 3
- Incorrect indentation HOT 4
- Integrating stringtemplate4 into OSS-Fuzz HOT 1
- ST4-testjar not found HOT 9
- Use Class.getDeclaredField instead of Class.getField HOT 2
- Separator not emitted for nulls until a value is hit HOT 4
- Multiple special characters in a single <...> does not work as documented HOT 1
- You cannot use i as variable name HOT 3
- Should support coercing the (non)emptiness of a Map or Collection to a Boolean for conditionals of the form `<if(a.p)>` where `p` is a Collection or Map HOT 2
- Comparison with python based template engines like jinja2/mustache
- Looking for code samples cited in this article: Language Translation Using ANTLR and StringTemplate HOT 4
- Support for Java records HOT 2
- Test failures like org.junit.ComparisonFailure: expected:<...etime: 7/5/05, 12:00[ ]AM> but was:<...etime: 7/5/05, 12:00[ ]AM>
- Successful test prints error
- Does it support Custom Function?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stringtemplate4.