Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtractIlluminaBarcodes throws a NullPointerException in the case of an empty lane directory #948

Merged
merged 2 commits into from Oct 22, 2017

Conversation

nh13
Copy link
Collaborator

@nh13 nh13 commented Oct 4, 2017

@jacarey want to take a look?

Exception:

Exception in thread "main" java.lang.NullPointerException
	at java.util.Objects.requireNonNull(Objects.java:203)
	at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
	at java.util.Arrays.asList(Arrays.java:3800)
	at picard.illumina.parser.IlluminaFileUtil.hasCbcls(IlluminaFileUtil.java:270)
	at picard.illumina.ExtractIlluminaBarcodes.customCommandLineValidation(ExtractIlluminaBarcodes.java:447)
	at picard.cmdline.CommandLineProgram.parseArgs(CommandLineProgram.java:323)
	at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:196)
	at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
	at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)

@nh13 nh13 requested a review from jacarey October 4, 2017 17:32
@coveralls
Copy link

coveralls commented Oct 4, 2017

Coverage Status

Coverage increased (+0.002%) to 76.871% when pulling f15e39b on nh_haz_cbcls into 17a95b5 on master.

@@ -265,6 +265,11 @@ public static boolean hasCbcls(final File basecallDir, final int lane) {
final File laneDir = new File(basecallDir, IlluminaFileUtil.longLaneStr(lane));
final File[] cycleDirs = IOUtil.getFilesMatchingRegexp(laneDir, IlluminaFileUtil.CYCLE_SUBDIRECTORY_PATTERN);

// Either the lane or the cycle directory do not exist!
if (cycleDirs == null) {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is an error, not an empty directory...should we throw/catch a more detailed error, or at least log something here?

@yfarjoun
Copy link
Contributor

@nh13 you are able to merge, right?

@nh13 nh13 merged commit 9275e28 into master Oct 22, 2017
@nh13 nh13 deleted the nh_haz_cbcls branch October 22, 2017 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants