You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flume.apache.org by rg...@apache.org on 2023/03/17 18:54:14 UTC

[flume] branch trunk updated: [FLUME-3454] fixing exception while starting agent configured to jms source when passwordFile field is missing

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 <37...@users.noreply.github.com>
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 <37...@users.noreply.github.com>
---
 .../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();