Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-9
-
Fix Version/s: 1.1-beta-1
-
Component/s: jelly/ant integration
-
Labels:None
-
Environment:Win2K, Sun JDK 1.4.1_01
-
Number of attachments :
Description
Setting a variable called "a" to a value and then testing it to see if it is empty works as expected (i.e. the variable is NOT empty). If the variable is called "a.b" - i.e. contains a "." character - then the "empty" test will fail. This maven.xml file demonstrates what I mean - in my environment it reports "single" as NOT being empty, but "two.levels" as being empty.
<project
default="tag:test-empty"
xmlns:j="jelly:core">
<goal name="tag:test-empty">
<j:set var="single" value="${1 == 1}"/>
Maven says single = ${single}.
Is single empty? Maven says [${empty single}].
<echo message="Flush output"/>
<j:set var="two.levels" value="${1 == 1}"/>
Maven says two.levels = ${two.levels}.
Is two.levels empty? Maven says [${empty two.levels}].
<echo message="Flush output"/>
</goal>
</project>
bloody jexl