[#4430] - "Error:null" when clicking the "Read Fields" button in the query editor

Category:
Bug report
Priority:
Normal
Status:
Assigned
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Not Attempted
Assigned to:
0

If a parameter has no default value, an NullPointerException happens in ReportQueryDialog.java.

--------------------
while (expression.indexOf("$P{") >= 0)
{
int start_index = expression.indexOf("$P{")+3;
String param_name = expression.substring(start_index, expression.indexOf("}", start_index) );
String param_expression = "";
for (int i=0; i<parameters.size(); ++i)
{
JRDesignParameter p = (JRDesignParameter)parameters.get(i);
if (p.getName().equals( param_name))
{
param_expression = p.getDefaultValueExpression().getText();

/// p.getDefaultValueExpression() is null
--------------------

In 3.0, this problem does not happen.

AttachmentSize
File reportquerydialog.diff659 bytes
asfernandes's picture
Joined: Aug 26 2007 - 11:42am
Last seen: 11 months 2 weeks ago

3 Comments:

#1

Is the fix for this issue scheduled for a future version?

#2

This issue affects us most about builtin parameters, where we can't put a default value.

Please apply this patch attached.

#3

Would you please apply the attached patched?

We run with it for a long time with previous versions. I don't want to need to repatch each version when we upgrade.

Thanks.

Feedback