Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more precise detection of the "null to primitive assignment" XStream …

…error.
  • Loading branch information...
commit 7e4a3fef093497efc2e0ec2a808b20a4873843c5 1 parent 7c7646a
@mgurov mgurov authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 core/src/main/java/cucumber/runtime/table/TableConverter.java
View
6 core/src/main/java/cucumber/runtime/table/TableConverter.java
@@ -110,7 +110,11 @@ public TableConverter(LocalizedXStreams.LocalizedXStream xStream, ParameterInfo
} catch (AbstractReflectionConverter.DuplicateFieldException e) {
throw new CucumberException(e.getShortMessage());
} catch (ConversionException e) {
- throw new CucumberException(String.format("Can't assign null value to one of the primitive fields in %s. Please use boxed types.", e.get("class")));
+ if (e.getCause() instanceof NullPointerException) {
+ throw new CucumberException(String.format("Can't assign null value to one of the primitive fields in %s. Please use boxed types.", e.get("class")));
+ } else {
+ throw e;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.