You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the set operation doesn't check if a null is supplied, but simply sets it, we actually have a key-value pair with key - null.
When we then try to override this key, we get a nullpointer exception, since a check exists to see if it is already a known value which isn't null-proof.
To test: add("key", null); add("key","something") EXCEPTION:java.lang.NullPointerException
at nl.hsac.fitnesse.fixture.util.NamespaceContextImpl.add(NamespaceContextImpl.java:30) [hsac-fitnesse-fixtures-2.4.1.jar]
at nl.hsac.fitnesse.fixture.Environment.registerNamespace(Environment.java:356) [hsac-fitnesse-fixtures-2.4.1.jar]
at nl.hsac.fitnesse.fixture.slim.XmlHttpTest.registerPrefixForNamespace(XmlHttpTest.java:26) [hsac-fitnesse-fixtures-2.4.1.jar]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) [rt.
The text was updated successfully, but these errors were encountered:
you want to ensure no prefix remains in the context after a test, you can place the 'register("key", null)' call in a TearDown page, so it will be executed after a test that actually sets a (non-null) value.
Since the set operation doesn't check if a null is supplied, but simply sets it, we actually have a key-value pair with key - null.
When we then try to override this key, we get a nullpointer exception, since a check exists to see if it is already a known value which isn't null-proof.
To test: add("key", null); add("key","something")
EXCEPTION:java.lang.NullPointerException
at nl.hsac.fitnesse.fixture.util.NamespaceContextImpl.add(NamespaceContextImpl.java:30) [hsac-fitnesse-fixtures-2.4.1.jar]
at nl.hsac.fitnesse.fixture.Environment.registerNamespace(Environment.java:356) [hsac-fitnesse-fixtures-2.4.1.jar]
at nl.hsac.fitnesse.fixture.slim.XmlHttpTest.registerPrefixForNamespace(XmlHttpTest.java:26) [hsac-fitnesse-fixtures-2.4.1.jar]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) [rt.
The text was updated successfully, but these errors were encountered: