-
Bug
-
Resolution: Done
-
Optional
-
2.3.7.Final, 3.0.7.Final
-
None
-
None
-
User Experience
-
Low
I noticed a Bug in the TJWSEmbeddedJaxrsServer implementation.
It defines the following two methods.
public String getProperty(String key) { return props.getProperty(key); } public String getPort() { return getProperty(Serve.ARG_PORT); }
The problem is that the port is not set via the Properties interface, but via the Hashtable interface of Properties
which does not enforce Strings and so it is stored as Integer.
TJWSServletServer
public void setPort(int port) { //props.put(Serve.ARG_PORT, Integer.toString(port)); props.put(Serve.ARG_PORT, port); }
The commented out line would actually work for get properties, but I guess that there was a reason it was commented out.
The main problem is that props are treated as a Map with mixed types in some places but in others it is treated as Properties which requires Map<String, String>.
The problem exists in resteasy 2.x and 3.x releases.