From 6df64160eb361459659d46343342df5d3703077f Mon Sep 17 00:00:00 2001 From: "Lee, Tian (tl5884)" Date: Wed, 13 Sep 2017 14:35:18 +0100 Subject: Fix NullPointerException caused by null log object Only two of the three constructors in MRBaseClient class actually initialises the fLog object. When the one that doesn't is invoked, any invokations of the logger in the class and its sub-classes will result in a NullPointerException. Change-Id: I112e932f22679b190dc03d00dc8d7341f8a24aa4 Issue-Id: DMAAP-132 Signed-off-by: Lee, Tian (tl5884) --- src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java b/src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java index a9fd9bd..012e95e 100644 --- a/src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java +++ b/src/main/java/com/att/nsa/mr/client/impl/MRBaseClient.java @@ -59,6 +59,8 @@ public class MRBaseClient extends HttpClient implements MRClient protected MRBaseClient ( Collection hosts ) throws MalformedURLException { super ( ConnectionType.HTTP, hosts, MRConstants.kStdMRServicePort ); + + fLog = LoggerFactory.getLogger ( this.getClass().getName () ); } protected MRBaseClient ( Collection hosts, int stdSvcPort ) throws MalformedURLException { -- cgit 1.2.3-korg