Given: Map<String, ?> options
generates a compiler error: put(java.lang.String,capture#398 of ?) in java.util.Map<java.lang.String,capture#398 of ?> cannot be applied to (java.lang.String,java.lang.String)
Can someone please tell me what syntax to use to get the data into this Map.
Assuming you can't redefine the map, then your only option is casting which means the compiler won't be able to guarantee type safety.
See this article for an explanation: [http://www.codeaholics.org/blog/generics-and-mystical-wildcard]
That was a good read. Now I understand why I can't do it, but still can't figure out how to force it.
I found a way to get the data into the options (it's for JBOSS security) - I can define it as a module-option in the XML.