Skip to content

Commit

Permalink
[JENKINS-49054] TreeUnmarshaller.convert could leave behind a corrupt…
Browse files Browse the repository at this point in the history
…ed type stack.
  • Loading branch information
jglick committed Jan 19, 2018
1 parent d29c62c commit 7ef77cf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ public Object convertAnother(final Object parent, Class<?> type, Converter conve
}

protected Object convert(final Object parent, final Class<?> type, final Converter converter) {
types.push(type);
try {
types.push(type);
final Object result = converter.unmarshal(reader, this);
types.popSilently();
return result;
return converter.unmarshal(reader, this);
} catch (final ConversionException conversionException) {
addInformationTo(conversionException, type, converter, parent);
throw conversionException;
} catch (final RuntimeException e) {
final ConversionException conversionException = new ConversionException(e);
addInformationTo(conversionException, type, converter, parent);
throw conversionException;
} finally {
types.popSilently();
}
}

Expand Down

0 comments on commit 7ef77cf

Please sign in to comment.