lbovet/jminix

LocalDate not supported

Opened this issue · 0 comments

Xsasan commented

I have a ValueBean with managedAttribute of type LocalDate:

@ManagedAttribute
@Override
public LocalDate getMyDate() {
    return myDate;
}

@ManagedAttribute
public void setMyDate(final LocalDate myDate) {
    this.myDate = myDate;
}

The value in the JMX console is presented in the format yyyy-mm-dd. When I change the value, an exception is thrown:

Internal Server Error (500) - The server encountered an unexpected condition which prevented it from fulfilling the request

//

Caused by: java.lang.RuntimeException: Type java.time.LocalDate is not supported
	at org.jminix.console.resource.ValueParser.parse(ValueParser.java:87)
	at org.jminix.console.resource.AttributeResource.update(AttributeResource.java:191)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
//