agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
81 stars 34 forks source link

POST/PUT breaks for Byte, Short and BigInteger types #630

Closed andrus closed 1 year ago

andrus commented 1 year ago

We are missing converters for Byte, Short and BigInteger types, so when Java objects have properties of those types, exceptions are thrown.

io.agrest.jaxrs2.provider.JaxrsAgExceptionMapper - 500 Internal Server Error (Exception processing Agrest 
request) [cause: class java.lang.Integer cannot be cast to class java.lang.Byte (java.lang.Integer and 
java.lang.Byte are in module java.base of loader 'bootstrap')]
io.agrest.jaxrs2.provider.JaxrsAgExceptionMapper - 500 Internal Server Error (Exception processing Agrest 
request) [cause: class java.lang.Integer cannot be cast to class java.lang.Short (java.lang.Integer and 
java.lang.Short are in module java.base of loader 'bootstrap')]
io.agrest.jaxrs2.provider.JaxrsAgExceptionMapper - 500 Internal Server Error (Exception processing Agrest 
request) [cause: Failed to instantiate type: java.math.BigInteger]