AmqpMessage.reject() throws "Can't release non-received message." (copy-paste from release())
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 95/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- testing-qa
調査の方向性
activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java を開き、release()、accept()、modify() と併せて reject() のガードを確認してください。Issue にある receiver がないシナリオを再現し、reject() が reject 操作を報告すること、またそれ以外では既存の IllegalStateException の動作が変わらないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Component: activemq-amqp — AMQP test client (src/test/java)
Version: present on main as of 2026-09-28, commit c339114e
Environment: not applicable — the defect is a compile-time string constant, independent of JVM, container and configuration.
Description
In AmqpMessage.java, the guard in reject() throws an IllegalStateException whose message names
the wrong operation. It is identical to the one thrown by release() directly above it:
- line 208,
release()—"Can't release non-received message."(correct) - line 221,
reject()—"Can't release non-received message."(should say "reject")
The sibling guards each name their own operation, so the intended text is unambiguous:
148
and 177
"Can't accept non-received message.",
195
"Can't modify non-received message.".
git blame traces the line to f71e0ee15b2c456dac28cf456deafb764221afa6 (2016-10-11), the commit
that added reject(), so the wording appears to be a copy-paste from release() rather than a
later regression.
Impact
Test-only and minor. This is the AMQP test client, not broker code, so there is no runtime effect on
users. The cost is diagnostic: a test that calls reject() on a message that was never received
reports a release failure, pointing whoever debugs it at the wrong method.
Steps to reproduce
AmqpMessage msg = new AmqpMessage(); // no receiver
try {
msg.reject();
fail("expected IllegalStateException");
} catch (IllegalStateException e) {
// actual: "Can't release non-received message."
// expected: "Can't reject non-received message."
}
Proposed fix
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
@@ (reject(), line 221)
public void reject() throws Exception {
if (receiver == null) {
- throw new IllegalStateException("Can't release non-received message.");
+ throw new IllegalStateException("Can't reject non-received message.");
}
I searched the open and closed GitHub issues and the AMQ JIRA project and did not find an existing
report. Happy to open a PR with this if it is welcome.
Provenance
This was found during an academic study of LLM-assisted code review at Jeonbuk National University, Jeonju, South Korea. An
automated LLM-based reviewer produced the initial analysis, and I verified it by reading the source at
c339114e. I am disclosing the origin in line with project norms on AI-assisted reports. I believe
it is a genuine, if trivial, defect and will respect your triage either way.
- 主要言語
- Java
- スター
- 2.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 54
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/activemq のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/activemq#2558 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Stale
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/activemq#1999 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100
apache/activemq#1871 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
Topic expiry task loads the whole JDBC topic store into the heap on PostgreSQL (AMQ-6067 fix is ineffective with pgjdbc)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/activemq#2630 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
apache/activemq の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Netcracker/qubership-integration-platform#1046 ·
メンテナーはふだん 2 日以内に返信
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Fix Math.ceilDiv wrong result for exact positive divisions対応中かも @pamod-madubashana が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
scala-native/scala-native#5094 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] AI unread message badge counts a batch of new bubbles as one message対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/rocketmq-dashboard#5784 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
PCL-Community/PCL-CE#3658 ·
メンテナーはふだん 1 日以内に返信