[ https://issues.apache.org/jira/browse/MNG-7830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17738177#comment-17738177 ]
ASF GitHub Bot commented on MNG-7830: ------------------------------------- gnodet commented on code in PR #1185: URL: https://github.com/apache/maven/pull/1185#discussion_r1245404521 ########## maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java: ########## @@ -120,23 +120,29 @@ private Model read(Reader reader, Path pomFile, Map<String, ?> options) throws I } else { return readModel(transformingParser, strict); } - } catch (XmlPullParserException e) { - throw new ModelParseException(e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e); + } catch (XMLStreamException e) { + Location location = e.getLocation(); + throw new ModelParseException( + e.getMessage(), + location != null ? location.getLineNumber() : -1, + location != null ? location.getColumnNumber() : -1, + e); } catch (IOException e) { throw e; } catch (Exception e) { Review Comment: The `IOException` can still occur during the call to `transformer.transform(...)` and we don't want to wrap it in another `IOException`... > Switch from plexus-xml to stax / woodstox > ----------------------------------------- > > Key: MNG-7830 > URL: https://issues.apache.org/jira/browse/MNG-7830 > Project: Maven > Issue Type: Dependency upgrade > Reporter: Guillaume Nodet > Assignee: Guillaume Nodet > Priority: Major > Fix For: 4.0.0-alpha-8 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)