Skip to content

Commit 0516115

Browse files
gabry-labpan3793
authored andcommitted
[KYUUBI #2532] avoid NPE in KyuubiHiveDriver.acceptsURL
### _Why are the changes needed?_ avoid NPE in KyuubiHiveDriver.acceptsURL ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [x] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2532 from gabrywu/avoidNPE. Closes #2532 16096e1 [gabrywu] avoid NPE in KyuubiHiveDriver.acceptsURL Authored-by: gabrywu <gabrywu@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent cdfae8d commit 0516115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/KyuubiHiveDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class KyuubiHiveDriver implements Driver {
4848

4949
@Override
5050
public boolean acceptsURL(String url) throws SQLException {
51-
return url.startsWith(Utils.URL_PREFIX);
51+
return url != null && url.startsWith(Utils.URL_PREFIX);
5252
}
5353

5454
@Override

0 commit comments

Comments
 (0)