This is an automated email from the ASF dual-hosted git repository.
rgoers pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/flume.git
The following commit(s) were added to refs/heads/trunk by this push:
new 0e4c38089 [FLUME-3454] fixing exception while starting agent
configured to jms source when passwordFile field is missing
new 5a4dd8bab Merge pull request #397 from nikita15p/bug-fix/FLUME-3454
0e4c38089 is described below
commit 0e4c38089d68b20f91969b41c74a448530432cd6
Author: nikita15p <[email protected]>
AuthorDate: Fri Mar 17 12:49:33 2023 +0530
[FLUME-3454] fixing exception while starting agent configured to jms source
when passwordFile field is missing
Signed-off-by: nikita15p <[email protected]>
---
.../src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java
b/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java
index 84409be67..3cbab0473 100644
---
a/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java
+++
b/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java
@@ -67,7 +67,7 @@ class JMSMessageConsumer {
try {
try {
- if (userName.isPresent()) {
+ if (userName.isPresent() && password.isPresent()) {
connection = connectionFactory.createConnection(userName.get(),
password.get());
} else {
connection = connectionFactory.createConnection();