Exception Trying to Use immutables

Hello
I was trying to use immutables on the simulator using the following code

static {
    outlines = new Hashtable<>(10);
    outlines.put(UNIFORM_OUTLINE_1, new UniformOutline(1));
    outlines.put(UNIFORM_OUTLINE_2, new UniformOutline(2));
    outlines.put(UNIFORM_OUTLINE_6, new UniformOutline(6));
    outlines.put(UNIFORM_OUTLINE_10, new UniformOutline(10));
    outlines.put(UNIFORM_OUTLINE_16, new UniformOutline(16));

    Immutables.putAll(outlines);
}

and then, I had the following exception

Exception in thread “main” java.lang.OutOfMemoryError
at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
at java.lang.Throwable.(Throwable.java:32)
at java.lang.Error.(Error.java:14)
at java.lang.VirtualMachineError.(VirtualMachineError.java:6)
at java.lang.OutOfMemoryError.(OutOfMemoryError.java:12)
at ej.bon.Immutables.putAll(Immutables.java:78)
at com.microej.demo.widget.theme.Theme.(Theme.java:52)
at com.microej.demo.widget.common.Navigation.main(Navigation.java:42)
at java.lang.MainThread.run(Thread.java:914)
at java.lang.Thread.runWrapper(Thread.java:387)

Hello @misael1805

The platform you use does not support the putAll method of the Immutables class, you cannot use it, it is an optional API that is not commonly used, we will document it better to clarify its use.

Sorry about the inconvenience.

Gaëtan for MicroEJ