100 questions
0
votes
1
answer
53
views
Overriding Jackson's serialization/deserialization config for immutables compability
I have a number of Immutables classes, like:
@Value.Immutable
interface Foo {
String bar();
}
To make these compatible with Jackson, I need to label these with @JsonDeserialize and @JsonSerialize,...
0
votes
1
answer
85
views
Why won't @Value.Immutable generate code if in test package?
@Value.Immutable
public interface Foobar {
List<Integer> getStuff();
// additional getter methods for custom objects
}
I am surprised to find the above code snippet when the file/package ...
0
votes
1
answer
121
views
Map jooq records to Immutables
There is a nice option of automatically, typesafe map jooq result to Java POJO e.g. using Java 16 records described here
I want to use objects created with Immutables library.
I can create factory ...
2
votes
0
answers
168
views
Immutables library builder collection hint
I'd like to use the Immutables java library to generate my pojo. The desire I have though is to use a different collection other that ArrayList or LinkedHashMap in the generated builder. Say for ...
0
votes
2
answers
551
views
Deserialize Json Object containing map with null values to Immutable with Jackson
I'm trying to deserialize a Json object that contains the following structure but am getting an error from Jackson during deserialization due to null values appearing in the the map containing the ...
-2
votes
2
answers
909
views
org immutables - no default constructor on abstract class
Using https://immutables.github.io/ I wonder if it is possible to have something like custom immutable abstract class inheriting from a class without a default constructor. In this example a sub of ...
1
vote
1
answer
567
views
Make all fields in Java Immutable Nullable
@Immutable
@Modifiable
public interface Record {
String id();
String fName();
String lName();
String mName();
}
All the fields in Record can be Nullable. One way for me to make ...
1
vote
0
answers
200
views
Immutables Library Does Not Require Collection Attributes To Be Set
I recently started using the Immutables library, and I'm puzzled by the following behavior:
Given the following abstract value type
@Value.Immutable
public abstract class Foo {
public abstract ...
1
vote
1
answer
474
views
Immutables custom create and of methods
I am changing a library that uses Immutables.
In the class that I change I just added a new variable and in the generated classes I see different signatures in the create and of methods.
...
0
votes
0
answers
94
views
How to make defensive copying in Immutables Java library?
I've been playing with the Immutables Java library for a while and I was wondering if there's any way of making defensive copying. Please consider the following code:
@Value.Immutable
public interface ...
0
votes
2
answers
579
views
JavaScript Executor Scroll Gesture Immutable Maps Arguments Issue
boolean canScrollMore = (Boolean) ((JavascriptExecutor) driver).executeScript("mobile: scrollGesture", ImmutableMap.of(
"left", 100, "top", 100, "width&...
1
vote
0
answers
163
views
Using Immutables with Thymeleaf multiple select for an Enum List
I've started using Thymeleaf recently, and generally been getting on pretty well. However I'm trying to use a multiple select to populate a list of Enums that are wrapped up in an immutable.
I ...
0
votes
1
answer
1k
views
Using Jackson and Immutables to create a Map from certain CSV columns
I have a CSV that I'm parsing through Jackson to create list of immutable type for each row. The CSV has some columns to represent a collection like:
Name,Age,Height,Item1,Item2,Item3,Item4,Item5
AB,1,...
1
vote
1
answer
193
views
Immutables autogenerated for MongoDB throws "Can't find a codec for class Immutable.."
Problem Description.
So I have an item that I want to use with MongoDB
@Value.Immutable
@Gson.TypeAdapters
@Criteria.Repository
interface Person {
@Criteria.Id
String id();
String ...
1
vote
0
answers
430
views
immutables.value.internal.$guava$.base.$VerifyException with java 17
I have problems getting my code to compile with maven.
I'm using these dependencies:
<dependencies>
<dependency>
<groupId>org.immutables</groupId>
<...