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
Description
The <Map> element is not used in Jetty XML files.
It cannot be customized to create Map implementations, it only creates HashMaps.
<Map> takes a list of <Entry> elements, but <Entry> takes a list of 2 <Item>, which is error prone (e.g. pass a number of items different from 2).
There is <Put> already that however is constrained to have a literal key in the name attribute (e.g. the key cannot be the result of a <SystemProperty>), which works with any Map implementations, for example java.util.Properties.
In summary, I think <Map> should be removed. Specific implementations can be created with <New>, and <Put> covers most cases. For the non covered cases, we can always use <Call>.
The text was updated successfully, but these errors were encountered:
Jetty version
10.0.x
Description
The
<Map>
element is not used in Jetty XML files.It cannot be customized to create
Map
implementations, it only createsHashMap
s.<Map>
takes a list of<Entry>
elements, but<Entry>
takes a list of 2<Item>
, which is error prone (e.g. pass a number of items different from 2).There is
<Put>
already that however is constrained to have a literal key in thename
attribute (e.g. the key cannot be the result of a<SystemProperty>
), which works with anyMap
implementations, for examplejava.util.Properties
.In summary, I think
<Map>
should be removed. Specific implementations can be created with<New>
, and<Put>
covers most cases. For the non covered cases, we can always use<Call>
.The text was updated successfully, but these errors were encountered: