Skip to content

Commit

Permalink
Merge pull request #357 from jfdenise/GAL-368
Browse files Browse the repository at this point in the history
GAL-368 Fix FormattingXmlStreamWriter.writeStartElement(...) delegation
  • Loading branch information
jfdenise authored Nov 12, 2024
2 parents 4689297 + 55bbbe1 commit 4b82dbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 Red Hat, Inc. and/or its affiliates
* Copyright 2016-2024 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -108,7 +108,7 @@ public void writeStartElement(final String prefix, final String localName, final
// If this is a nested element flush the outer
nl();
indent();
delegate.writeStartElement(prefix, namespaceURI, localName);
delegate.writeStartElement(prefix, localName, namespaceURI);
level++;
state = START_ELEMENT;
indentEndElement = false;
Expand All @@ -124,7 +124,7 @@ public void writeEmptyElement(final String namespaceURI, final String localName)
public void writeEmptyElement(final String prefix, final String localName, final String namespaceURI) throws XMLStreamException {
nl();
indent();
delegate.writeEmptyElement(prefix, namespaceURI, localName);
delegate.writeEmptyElement(prefix, localName, namespaceURI);
state = END_ELEMENT;
}

Expand Down Expand Up @@ -429,4 +429,4 @@ public void remove() {
}
}

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 Red Hat, Inc. and/or its affiliates
* Copyright 2016-2024 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -115,7 +115,7 @@ public void writeStartElement(final String prefix, final String localName, final
// If this is a nested element flush the outer
nl();
indent();
delegate.writeStartElement(prefix, namespaceURI, localName);
delegate.writeStartElement(prefix, localName, namespaceURI);
level++;
state = START_ELEMENT;
indentEndElement = false;
Expand All @@ -131,7 +131,7 @@ public void writeEmptyElement(final String namespaceURI, final String localName)
public void writeEmptyElement(final String prefix, final String localName, final String namespaceURI) throws XMLStreamException {
nl();
indent();
delegate.writeEmptyElement(prefix, namespaceURI, localName);
delegate.writeEmptyElement(prefix, localName, namespaceURI);
state = END_ELEMENT;
}

Expand Down Expand Up @@ -436,4 +436,4 @@ public void remove() {
}
}

}
}

0 comments on commit 4b82dbc

Please sign in to comment.