You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by pl...@jakarta.apache.org on 2004/10/15 04:03:51 UTC
[jira] Resolved: (PLUTO-66) TestPortlet assumes testId will be a number
Message:
The following issue has been resolved as FIXED.
Resolver: David DeWolf
Date: Thu, 14 Oct 2004 7:03 PM
Thanks! Patch Applied
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/PLUTO-66
Here is an overview of the issue:
---------------------------------------------------------------------
Key: PLUTO-66
Summary: TestPortlet assumes testId will be a number
Type: Bug
Status: Resolved
Priority: Major
Resolution: FIXED
Project: Pluto
Components:
testsuite
Fix Fors:
Current CVS
Versions:
Current CVS
Assignee:
Reporter: Ken Weiner
Created: Wed, 22 Sep 2004 5:58 PM
Updated: Thu, 14 Oct 2004 7:03 PM
Description:
In TestPortlet.doDispatch(), the following code assumes that the test portlet will be a number (line 127):
TestConfig config = null;
if(testId != null) {
config = (TestConfig)configs.get(Integer.parseInt(testId));
}
This throws a java.lang.NumberFormatException when the testId has no value which is currently the case when you click the "Return to Index" button in the test portlet.
One way to fix this is to check for the case when testId is an empty String or when testId is not a number inside the getTestId(PortletRequest req) method. In that case, the method should return null.
For example, the first "if" block in that method could be changed to this (line 181):
if((testId == null || testId.trim().length() == 0) &&
next == null && previous == null && tests.size() > 0) {
return null;
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira