Hi!

I have a quick question on MavenXpp3Reader#read()

It throws the checked IOException and XmlPullParserException, but can it also 
throw unchecked Exceptions under 'normal' conditions?

The code I need this for is PomFinder#findMatchingPom and PomFinder#parsePom. I 
like to make sure that it doesn't throw Exceptions on just parsing an 'invalid' 
pom. 

This is a perfectly legal scenario if you e.g. try to release a project with 
ITs or other scenarios where pom.xml files are present in a non-valid form in 
the SCM (because they e.g. get dynamically constructed, testing pom parsing, 
etc). 

So I'm not sure if I should add a catch (Exception e) instead of the 2 checked 
exceptions, or if all sane cases are already wrapped in XmlPullParserException.

Any advice?

txs and LieGrue,
strub


      

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to