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
In AtmosphereRequestImpl.wrap the request attributes are copied into LocalAttributes instance of request builder one by one. LocalAttributes internally stores attributes in a ConcurrentHashMap, that does not accept null keys or value.
On Jetty 12 a request may contain a null value for an attribute named org.eclipse.jetty.multipartConfig. In this situation the wrap call fails with the following error:
Caused by: java.lang.NullPointerException: null
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011) ~[na:na]
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006) ~[na:na]
at org.atmosphere.cpr.AtmosphereRequest$LocalAttributes.put(AtmosphereRequest.java:589) ~[atmosphere-runtime-3.0.3.slf4jvaadin2.jar:3.0.3.slf4jvaadin2]
at org.atmosphere.cpr.AtmosphereRequestImpl.wrap(AtmosphereRequestImpl.java:1450) ~[atmosphere-runtime-3.0.3.slf4jvaadin2.jar:3.0.3.slf4jvaadin2]
at com.vaadin.flow.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:292) ~[flow-server-24.3.5.jar:24.3.5]
at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1574) ~[flow-server-24.3.5.jar:24.3.5]
... 55 common frames omitted
Additional note: the wrap method currently calls attributeWithoutException to prevent a potential NPE when getting the attribute from the request (#1732).
Atmosphere Info
version: 3.0.3.slf4jvaadin2
Expected behavior
wrap does not fail if there are request attribute keys associated with null values. It could probably ignore the attribute.
Systems (please complete the following information):
Describe the bug
In
AtmosphereRequestImpl.wrap
the request attributes are copied intoLocalAttributes
instance of request builder one by one.LocalAttributes
internally stores attributes in aConcurrentHashMap
, that does not accept null keys or value.On Jetty 12 a request may contain a null value for an attribute named
org.eclipse.jetty.multipartConfig
. In this situation thewrap
call fails with the following error:Additional note: the
wrap
method currently callsattributeWithoutException
to prevent a potential NPE when getting the attribute from the request (#1732).Atmosphere Info
Expected behavior
wrap
does not fail if there are request attribute keys associated with null values. It could probably ignore the attribute.Systems (please complete the following information):
Additional context
Original issue on Vaadin Flow: vaadin/flow#18345
The text was updated successfully, but these errors were encountered: