[JAVA] Invalid lambda deserialization on Apache Wicket 8 Lambda

Note.

add(new ListView<String>("labels", Arrays.asList("a", "b", "c")) {
  @Override
  protected void populateItem(ListItem<String> item) {
    item.add(new Label("label", item::getModelObject));
  }
});

If you throw the getModelObject method of ListItem into Model. Maybe at the timing of redrawing if the page is not Bookmarkable

java.lang.IllegalArgumentException: Invalid lambda deserialization

It will be done. I think, "Oh yeah, it's not good to do it, isn't it?", But I can't give a clear cause, so I'm afraid.

Recommended Posts

Invalid lambda deserialization on Apache Wicket 8 Lambda
FileUpload with Rest on Apache Wicket
Lambda on Terraform Container
Apache2 on Ubuntu20.04 LTS
I tried using Apache Wicket