[ 
https://issues.apache.org/jira/browse/LIVY-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

György Gál resolved LIVY-1030.
------------------------------
    Fix Version/s: 0.10.0
       Resolution: Fixed

> 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
>            Priority: Major
>             Fix For: 0.10.0
>
>          Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to