private boolean checkAppPathsForVia ( Set < String > keySet , List < String > errors ) { for ( String key : keySet ) { if ( ! key . equals ( "defaultKey" ) ) { File file = new File ( key ) ; if ( ! file . exists ( ) ) { errors . add ( "Effective Usage Analysis will not run if the -appPath parameter references an invalid file path. Check that the -appPath parameter specifies a valid path" ) ; return false ; } else if ( ! file . isFile ( ) ) { errors . add ( "Effective Usage Analysis will not run if the -appPath parameter references an invalid file path. Check that the -appPath parameter specifies a valid path" ) ; return false ; } else { return true ; } } } return false ; }
check validation for appPath property first check if the path is exist and then if this path is not a directory