Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
This repository was archived by the owner on May 13, 2025. It is now read-only.

The default value for com.sun.faces.clientStateTimeout is invalid #78

@vsvetoslavov

Description

@vsvetoslavov

The constructor in WebConfiguration for the ClientStateTimeout value defines the default value as "".
The init() method of ClientSideStateHelper, however, contains the following:

        stateTimeoutEnabled = webConfig.isSet(ClientStateTimeout);
        if (stateTimeoutEnabled) {
            String timeout = webConfig.getOptionValue(ClientStateTimeout);
            try {
                stateTimeout = Long.parseLong(timeout);
            } catch (NumberFormatException nfe) {
                stateTimeout = Long.parseLong(ClientStateTimeout.getDefaultValue());
            }
        }

So if the value in the web.xml is invalid, an attempt is made to read "" as Long, which in turn results in NumberFormatException.
The above behaviour is present in 2.3.9.SP03 (WildFly 18.0.0). The code for 2.3.9.SP11 seems like that as well but I haven't tested with that version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions