You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/11 15:14:00 UTC

[jira] [Work logged] (SUBMARINE-79) Cleanup MockRemoteDirectoryManager

     [ https://issues.apache.org/jira/browse/SUBMARINE-79?focusedWorklogId=401509&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-401509 ]

ASF GitHub Bot logged work on SUBMARINE-79:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Mar/20 15:13
            Start Date: 11/Mar/20 15:13
    Worklog Time Spent: 10m 
      Work Description: cchung100m commented on pull request #223: SUBMARINE-79. Solve potential NPE for MockRemoteDirectoryManager
URL: https://github.com/apache/submarine/pull/223
 
 
   ### What is this PR for?
   
   Solve potential NPE for MockRemoteDirectoryManager
   
   MockRemoteDirectoryManager#getModelDir:
   
   `File modelDir = new File(modelParentDir.getAbsolutePath(), modelName);`
   
   If modelParentDir is null, we could have an NPE easily.
   
   ### What type of PR is it?
   [Bug Fix | Improvement ]
   
   
   ### What is the Jira issue?
   
   https://issues.apache.org/jira/browse/SUBMARINE-79
   
   ### How should this be tested?
   
   https://travis-ci.com/cchung100m/submarine/builds/152619875
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 401509)
    Remaining Estimate: 0h
            Time Spent: 10m

> Cleanup MockRemoteDirectoryManager
> ----------------------------------
>
>                 Key: SUBMARINE-79
>                 URL: https://issues.apache.org/jira/browse/SUBMARINE-79
>             Project: Apache Submarine
>          Issue Type: Improvement
>          Components: Commons
>            Reporter: Szilard Nemeth
>            Assignee: Neo Chien
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Many methods in MockRemoteDirectoryManager are declaring unnecessary throws clause for IOException.
> Also, there are 2 dangerous NPE candidates: 
> 1. MockRemoteDirectoryManager#getJobStagingArea: 
> {code:java}
> this.jobDir = new File(jobsParentDir.getAbsolutePath(), jobName);
> {code}
> If jobsParentDir is null, we could have an NPE easily.
> 2. MockRemoteDirectoryManager#getModelDir: 
> {code:java}
> File modelDir = new File(modelParentDir.getAbsolutePath(), modelName);
> {code}
> If modelParentDir is null, we could have an NPE easily.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org