File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/main/java/com/rabbitmq/stream Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ static EnvironmentBuilder builder() {
5757 /**
5858 * Delete a stream
5959 *
60- * @param stream
60+ * @param stream the stream to delete
6161 */
6262 void deleteStream (String stream );
6363
@@ -66,7 +66,7 @@ static EnvironmentBuilder builder() {
6666 *
6767 * <p>Requires RabbitMQ 3.11 or more.
6868 *
69- * @param stream
69+ * @param stream the stream to get statistics from
7070 * @return statistics on the stream
7171 * @throws UnsupportedOperationException if the broker does not support this command
7272 */
@@ -75,7 +75,7 @@ static EnvironmentBuilder builder() {
7575 /**
7676 * Return whether a stream exists or not.
7777 *
78- * @param stream
78+ * @param stream the stream to check the existence
7979 * @return true if stream exists, false if it does not exist
8080 * @throws StreamException if response code is different from {@link Constants#RESPONSE_CODE_OK}
8181 * or {@link Constants#RESPONSE_CODE_STREAM_DOES_NOT_EXIST}
Original file line number Diff line number Diff line change @@ -216,8 +216,10 @@ class StreamEnvironment implements Environment {
216216 lastException = e ;
217217 }
218218 }
219- if (this .locators .stream ().allMatch (l -> l .isNotSet ())) {
220- throw lastException ;
219+ if (this .locators .stream ().allMatch (Locator ::isNotSet )) {
220+ throw lastException == null
221+ ? new StreamException ("Not locator available" )
222+ : lastException ;
221223 } else {
222224 this .locators .forEach (
223225 l -> {
You can’t perform that action at this time.
0 commit comments