Edward Capriolo created LIVY-1030:
-------------------------------------
Summary: Potential NPE in ContextLauncher and assorted cleanups
Key: LIVY-1030
URL: https://issues.apache.org/jira/browse/LIVY-1030
Project: Livy
Issue Type: Bug
Reporter: Edward Capriolo
Assignee: Edward Capriolo
There is a subtle NPE and there are various other cleanups that make the code
match modern style rules
{code:java}
List<String> jars = new ArrayList<>();
for (File dir : allJars) {
- for (File f : dir.listFiles()) {
- jars.add(f.getAbsolutePath());
+ File [] list = dir.listFiles();
+ if (list != null) {
+ for (File f : list) {
+ jars.add(f.getAbsolutePath());
+ }
}
}
{code}
There are also unused variables, redundant or missing modifiers, etc. I cleaned
as I went.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)