CloudEvents incompatiable with Spring-framework 7.x

オープン
#704 コメント 4 件 リアクション 10 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, spring
領域
api, backend

調査の方向性

HttpMessageFactory.createReaderFromMultimap と CloudEventHttpUtils.toReader から開始し、スタックトレースの失敗経路をたどって、Spring Framework 7 でメッセージの受信を再現します。CloudEventHttpMessageConverter を通じた HttpHeaders の処理を追跡します。完了条件は、メッセージの受信で IncompatibleClassChangeError が発生しなくなることです。

索引モデルが issue の本文から書いたものです。

説明

I know there is a similar issue up already about upgrading to Spring-boot 2.7.18 but this project has lagged so far behind now that you can't even launch it with using an up-to-date ecosystem since Spring Framework 7 introduced a breaking change:

HttpHeaders changes
The HttpHeaders API has been revisited in 7.0. This class no longer extends the MultiValueMap contract. Underlying servers treat headers more like a collection of pairs, and many map-like operations do not behave or perform well, because headers are case-insensitive in the first place. We therefore removed several methods as a result and introduced fallbacks as immediately @Deprecated, like HttpHeaders#asMultiValueMap. Please consider other methods as much as possible. See #33913 for more details.

Stacktrace you get when running latest release of cloudevent and you try to receive a message:
"Class org.springframework.http.HttpHeaders does not implement the requested interface java.util.Map","error.stack_trace":"java.lang.IncompatibleClassChangeError: Class org.springframework.http.HttpHeaders does not implement the requested interface java.util.Map\n\tat io.cloudevents.http.HttpMessageFactory.lambda$createReaderFromMultimap$5(HttpMessageFactory.java:112)\n\tat io.cloudevents.http.HttpMessageFactory.createReader(HttpMessageFactory.java:70)\n\tat io.cloudevents.http.HttpMessageFactory.createReaderFromMultimap(HttpMessageFactory.java:114)\n\tat io.cloudevents.spring.http.CloudEventHttpUtils.toReader(CloudEventHttpUtils.java:55)\n\tat io.cloudevents.spring.mvc.CloudEventHttpMessageConverter.readInternal(CloudEventHttpMessageConverter.java:54)\n\tat io.cloudevents.spring.mvc.CloudEventHttpMessageConverter.readInternal(CloudEventHttpMessageConverter.java:39)\n\tat org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:196)\n\tat

主要言語
Java
スター
446
フォーク
172
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudevents/sdk-java のほかの issue

cloudevents/sdk-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。