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

Not so helpful exceptions thrown when invalid commits are specified #192

lordofthejars opened this Issue Sep 26, 2017 · 0 comments


None yet
2 participants

lordofthejars commented Sep 26, 2017

Issue Overview

If you configure Smart Testing and create a job in Jenkins, the first time you run since there is no previous commit registered in Jenkins, next command is executed:

mvn '-Dsmart.testing=new, affected' -Dsmart.testing.mode=ordering -Dscm.range.head=2c5121ba00ac0f94c2bd24e22cc9d7c2f55c9790 -Dscm.range.tail=null test
which is translated to a Null Pointer Exception:

Caused by: java.lang.NullPointerException
	at org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(

Maybe it will be worth to detect this null pointer exception and throw an IllegalArgumentExceptionexplaining the reason.

Expected Behaviour

Throw Illegal Argument Exception.

Current Behaviour

Throws a Null Pointer Exception without explaining why.

@lordofthejars lordofthejars added this to the 0.0.2 milestone Sep 26, 2017

lordofthejars added a commit to lordofthejars/smart-testing that referenced this issue Sep 26, 2017

@lordofthejars lordofthejars self-assigned this Sep 26, 2017

@bartoszmajsak bartoszmajsak changed the title from NullPointerException thrown when invalid commit to Not so helpful exceptions thrown when invalid commits are specified Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment