martin-g commented on a change in pull request #356: Wicket 6662
URL: https://github.com/apache/wicket/pull/356#discussion_r281585885
##########
File path:
wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
##########
@@ -117,9 +117,9 @@ public void setResponseRequestEncoding(final String
responseRequestEncoding)
* @see
org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
*/
@Override
- public void setTimeout(final String timeout)
+ public void setTimeout(final Duration timeout)
Review comment:
JMX works with a text-based protocol, like HTTP.
E.g. a user opens a UI and enters the values for the exposed settings.
If the type of the property is a String or a primitive then all is fine
(e.g. JMX will just use `Integer.parseInt(input)`).
But if the of the property is of some complex type then someone has to help
JMX to convert the String input to the target type.
I doubt there is a default converter for `java.time.Duration`.
You can test it by starting a Wicket app and then connect to the JVM via
JConsole or similar tool (e.g. wicketstuff-jmx-panel) and try to set a new
value for `RequestCycleSettings#timeout`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services