Robert Važan
Robert Važan
My setup: ```java ObjectMapper mapper = new ObjectMapper(new CBORFactory()); mapper.readValue(serialized, MyRecord.class) ```
@GedMarc I don't want to add annotations to the records themselves, because they are part of public API, but I have tried the following on `ObjectMapper` with no success: ```java...
@cowtowncoder Why do you think the test would be hard to write? All you need is a tiny Java 16+ project with `module-info.java`, serializable record under `src` in exported package,...
@cowtowncoder Well, exception is trivial to obtain: ``` Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Failed to call `setAccess()` on Field 'width' due to `java.lang.reflect.InaccessibleObjectException`, problem: Unable to make field private final int mypkg.MyClass.width...
@GedMarc I am observing these exceptions in unit tests of the project that defines the records, so unit tests definitely do use modules. The only gotcha I can see is...
@albertcheng Since Java 9, every module decides for itself whether it wants to open its classes for reflection. The correct solution is to turn every library into a module and...
AFAIK, Java allows you to narrow return types in derived classes. You can override it as `public T clone()` even though `Object` declares it as `protected Object clone() throws CloneNotSupportedException`.
You could declare maven dependency on `javax.servlet-api` as `provided`. You could then code easily against servlet API without ugly workarounds like `Class.forName()`. GAJ's maven artifact would not directly depend on...
And why not declare the dependency on the servlet API? The `javax.servlet-api` package only contains various interfaces with no reference to anything heavy like servlet container. Anyways, if adding server...
In case you want to keep the recursive generics solution, please at least provide dynamic hit class where we can set hit type just like any other parameter. If other...