JRebel does not pick up a lambda class member

ZeroTurnaround Homepage Forums JRebel Support JRebel does not pick up a lambda class member

This topic contains 1 reply, has 2 voices, and was last updated by  Meelis 3 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #61934

    Alex Kudinov
    Member

    Code before:

    public List<PlayMapArea> getMapAreasX() {
        return jdbcTemplate.query(env.getProperty("sql.play.area.map.all"),
            (rs, integer) -> PlayMapArea
                .builder()
                .playId(rs.getInt("play_id"))
                .id(rs.getString("area_id"))
                .title(rs.getString("title"))
                .color(rs.getString("color"))
                .selectable(rs.getString("selectable"))
                .stateAbbr(rs.getString("state_abbr"))
                .state(rs.getString("state"))
                .build());
      }

    code after:

    private static final ResultSetBiFunction<PlayMapArea> getPlayMapAreaFn = (rs, integer) -> PlayMapArea
          .builder()
          .playId(rs.getInt("play_id"))
          .id(rs.getString("area_id"))
          .title(rs.getString("title"))
          .color(rs.getString("color"))
          .selectable(rs.getString("selectable"))
          .stateAbbr(rs.getString("state_abbr"))
          .state(rs.getString("state"))
          .build();
    
      @Override
      public List<PlayMapArea> getMapAreas() {
        return jdbcTemplate.query(env.getProperty("sql.play.area.map.all"),
            getPlayMapAreaFn::apply);
      }

    Class was reloaded, but getPlayMapAreaFn was not initialized until the server (Tomcat) restart.
    Just an interesting tidbit.

    #61950

    Meelis
    Moderator

    Hi,

    Thanks for the report, i can confirm that this error reproduces on our end.
    We will investigate it and will hopefully have a solution soon. Will keep you informed.

    #62004

    Meelis
    Moderator

    Hi,

    The bug has been resolved and a fix is available in the nightly build here: https://zeroturnaround.com/software/jrebel/download/nightly-build/

    The fix will also be available in the 7.0.6 release next week.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.