hunterhacker/jdom — Issue #50: Namespace URI's can be any white-space
Author: rolfl
Created: 2011-10-25 10:18:15+00:00
State: open

Namespace URI's can be any sequence of white-space, and any such URI is 'trimmed' to just "". This means that any code will get the NO_NAMESPACE namespace for any white-space sequence.

The actual white-space characters are not actually legal URI anyway, and these white-space URI's should be rejected as IllegalNameException.

Namespace URI Verification is very 'light-weight' as it is, but it would fail for empty namespaces, but the test is side-stepped by the trimming.

Additionally, the trim() is an operation don every time there is a getNamespace(), and it is unnecessary in 99.9999% (rough guess) of the time which is a waste of cycles.