[#8811] - ARRAY.length is marked as invalid expression in Expression Editor

Category:
Bug report
Priority:
Normal
Status:
Confirmed
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
N/A
Assigned to:
0

ARRAY.length is marked as invalid expression, in Expression Editor, where ARRAY is an array e.g. String[]

AttachmentSize
array_length.png3.51 KB
cristian.gavrila.ro's picture
Joined: Mar 22 2013 - 5:49am
Last seen: 10 months 3 weeks ago

2 Comments:

#1
  • Status:New» Feedback Requested

Clarify, please, how do define an array for your parameter with details.
Better is to attach your sample report.
Thanks.

#2
  • Status:Feedback Requested» Confirmed
  • Assigned:» mrabbi

I was able to reproduce. Seems like the bug is valid and should be fixed.

Steps:
1. Create a parameter "A"
2. Set it's class java.lang.Object[]
3. Optionally set Default Value Expression to "new String[3]" (for example)
4. Add a Text Field "$P{A}.length to your report

Expression editor will show a validation error (.length), but report will display correct value "3" after run.

Screencast: https://drive.google.com/file/d/0B4nt80DosU8YM3JfSEVXV0xwUjg/view?usp=dr...

Feedback
randomness