Bug 144409 - NumberFormatException thrown if no web.allow_pxt_personalities is defined.
Summary: NumberFormatException thrown if no web.allow_pxt_personalities is defined.
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/R&D   
(Show other bugs)
Version: RHN Devel
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ryan Bloom
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: rhnMilestone1
TreeView+ depends on / blocked
 
Reported: 2005-01-06 20:02 UTC by Jesus M. Rodriguez
Modified: 2007-04-18 17:17 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-20 19:26:28 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jesus M. Rodriguez 2005-01-06 20:02:06 UTC
An exception is thrown if web.allow_pxt_personalities is not
present or of the wrong format in the configuration files.
Config.getInt() should throw a NumberFormatException.
And the call of that should handle such an error.

Files affected:
RhnHelper.java: getSessionCookieName, line 408
Config.java: getInt, line 165

Exception:
java.lang.NumberFormatException: null
	java.lang.Integer.parseInt(Integer.java(Compiled Code))
	java.lang.Integer.parseInt(Integer.java(Compiled Code))
	com.redhat.rhn.common.conf.Config.getInt(Config.java:165)
	com.redhat.rhn.frontend.struts.RhnHelper.getSessionCookieName(RhnHelper.java:408)
	com.redhat.rhn.frontend.struts.RhnHelper.findUserSession(RhnHelper.java:134)
	com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:65)
	com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142)
	com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
	com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:73)

Comment 1 Ryan Bloom 2005-01-20 19:26:08 UTC
Asking for a non-existant config variable shouldn't throw an exception
at all.  It should return a sane default, in this case 0.  The code
now does this.


Note You need to log in before you can comment on or make changes to this bug.