JRebel does not pick up a lambda class member

Forum on this website is being phased out. New threads or replies cannot be posted. Existing content remains available for now in read only mode. You can contact technical support at support@zeroturnaround.com.

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 1 year, 1 month 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)

The forum ‘JRebel Support’ is closed to new topics and replies.