eqasim-java
eqasim-java copied to clipboard
bug: VDF not working when using config to configure
Basically, in the VDFConfigGroup
, the modes are initially populated using the Set.of()
method, which creates an unmodifiable set. And then the code tries to clear this set when reading from the config file here:
https://github.com/eqasim-org/eqasim-java/blob/953b766d927fe6c117f9473bea9fda2f547fe810/vdf/src/main/java/org/eqasim/vdf/VDFConfigGroup.java#L182
and here:
https://github.com/eqasim-org/eqasim-java/blob/80fa272adfac9827e08d3c3d5f3b6283e820abf2/vdf/src/main/java/org/eqasim/vdf/engine/VDFEngineConfigGroup.java#L40
which causes a java.lang.UnsupportedOperationException
.
Probably something like this can be used instead for the initialization of the Set:
Set<String> modes = Stream.of("car", "car_passenger") .collect(Collectors.toSet());