From 55bbbe18e7ce2da4b023781eafeade2d33048816 Mon Sep 17 00:00:00 2001 From: Paul Ferraro Date: Mon, 11 Nov 2024 10:37:17 +0000 Subject: [PATCH] GAL-368 Fix FormattingXmlStreamWriter.writeStartElement(...) delegation Also FormattingXmlStreamWriter.writeEmptyElement(...) --- .../jboss/galleon/xml/util/FormattingXmlStreamWriter.java | 8 ++++---- .../jboss/galleon/xml/util/FormattingXmlStreamWriter.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common-api/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java b/common-api/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java index 3d93d5f0..382c25dd 100644 --- a/common-api/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java +++ b/common-api/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java @@ -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"); @@ -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; @@ -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; } @@ -429,4 +429,4 @@ public void remove() { } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java b/core/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java index 4c381479..471edc82 100644 --- a/core/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java +++ b/core/src/main/java/org/jboss/galleon/xml/util/FormattingXmlStreamWriter.java @@ -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"); @@ -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; @@ -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; } @@ -436,4 +436,4 @@ public void remove() { } } -} \ No newline at end of file +}