One day, a coworker sent me a message saying some stuff stopped working after merging in some of my changes. So I tried running it and it didn't work. I also added logging to the code I changed, which was all Java, and it was working fine. I then tracked it down to some JSTL (untouched by me):
<c:set var="flag" value="{flag1 || flag2}"/>
...
<c:if test="${flag}">
... stuff that failed to appear ...
</c:if>
The first line should have been
<c:set var="flag" value="${flag1 || flag2}"/>
This is the type of stupid mistake that compile-time checking, especially with static typing, can catch.
No comments:
Post a Comment