> On Sept. 15, 2014, 8:11 p.m., Abraham Elmahrek wrote: > > src/java/org/apache/sqoop/ConnFactory.java, lines 302-305 > > <https://reviews.apache.org/r/25636/diff/1/?file=689208#file689208line302> > > > > It seems like fileNames cannot be null? > > > > http://docs.oracle.com/javase/7/docs/api/java/io/File.html#list() > > Qian Xu wrote: > @Abe, according to the stacktrace at JIRA, it means sense to do a > defensive check again null.
@Abraham Elmahrek, If a SecurityManager exists, list() raises a SecurityException, otherwise list() returns null and that's why NPE occurs in permission denied situation. So I choose check both list()'s return value and raising exception. A following link gives an explanation of this situation. http://stackoverflow.com/questions/5130002/inaccessible-files-and-file-list - Chiwan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25636/#review53395 ----------------------------------------------------------- On Sept. 15, 2014, 8:21 a.m., Chiwan Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25636/ > ----------------------------------------------------------- > > (Updated Sept. 15, 2014, 8:21 a.m.) > > > Review request for Sqoop. > > > Bugs: SQOOP-1387 > https://issues.apache.org/jira/browse/SQOOP-1387 > > > Repository: sqoop-trunk > > > Description > ------- > > I fixed a bug reported in SQOOP-1387. After applying this patch, Sqoop will > log some warning messages when there is no permission on managers.d directory. > > > Diffs > ----- > > src/java/org/apache/sqoop/ConnFactory.java e9c45bc > > Diff: https://reviews.apache.org/r/25636/diff/ > > > Testing > ------- > > Tested on test cluster using (1.4.6-SNAPSHOT) with no permission on > managers.d directory. > > > Thanks, > > Chiwan Park > >
