[ https://issues.apache.org/jira/browse/KNOX-3043?focusedWorklogId=923663&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-923663 ]
ASF GitHub Bot logged work on KNOX-3043: ---------------------------------------- Author: ASF GitHub Bot Created on: 17/Jun/24 10:33 Start Date: 17/Jun/24 10:33 Worklog Time Spent: 10m Work Description: moresandeep commented on code in PR #917: URL: https://github.com/apache/knox/pull/917#discussion_r1642588449 ########## gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java: ########## @@ -2570,10 +2570,16 @@ public String getUsage() { private static Properties loadBuildProperties() { Properties properties = new Properties(); - try(InputStream inputStream = KnoxCLI.class.getClassLoader().getResourceAsStream( "build.properties" )) { - properties.load(inputStream); + String BUILD_PROPERTY = "build.properties"; + PrintStream out = System.out; Review Comment: We already have `out` defined on line 142 so we don't have to do it here again. Issue Time Tracking ------------------- Worklog Id: (was: 923663) Time Spent: 40m (was: 0.5h) > NullpointerException in calling loadBuildProperties > --------------------------------------------------- > > Key: KNOX-3043 > URL: https://issues.apache.org/jira/browse/KNOX-3043 > Project: Apache Knox > Issue Type: Bug > Affects Versions: 2.0.0, 1.6.1 > Reporter: Senthil Kumar > Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > Getting NullPointerException while calling loadBuildProperties in both > GatewayServer and KnoxCLI > SEVERE: Failed to start gateway: java.lang.NullPointerException > java.lang.NullPointerException > at java.util.Properties$LineReader.readLine(Properties.java:434) > at java.util.Properties.load0(Properties.java:353) > at java.util.Properties.load(Properties.java:341) > at > org.apache.knox.gateway.GatewayServer.loadBuildProperties(GatewayServer.java:306) > at org.apache.knox.gateway.GatewayServer.main(GatewayServer.java:160) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.knox.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:68) > at org.apache.knox.gateway.launcher.Invoker.invoke(Invoker.java:39) > at org.apache.knox.gateway.launcher.Command.run(Command.java:99) > at org.apache.knox.gateway.launcher.Launcher.run(Launcher.java:75) > at org.apache.knox.gateway.launcher.Launcher.main(Launcher.java:52) -- This message was sent by Atlassian Jira (v8.20.10#820010)