private static HotSwapStatusListener makeNullSafe(HotSwapStatusListener listener) {
    return new HotSwapStatusListener() {
      @Override
      public void onCancel(List<DebuggerSession> sessions) {
        if (listener != null) listener.onCancel(sessions);
      }

      @Override
      public void onSuccess(List<DebuggerSession> sessions) {
        if (listener != null) listener.onSuccess(sessions);
      }

      @Override
      public void onFailure(List<DebuggerSession> sessions) {
        if (listener != null) listener.onFailure(sessions);
      }
    };
  }
private static HotSwapStatusListener makeNullSafe(HotSwapStatusListener listener)