@@ -274,7 +274,7 @@ private String getNodeValue(Node node) {
274274 * @return the content, optionally wrapped in an array based on force_array setting
275275 */
276276 private Object applyForceArray (String elementName , Object content ) {
277- if (forceArray && ! (content instanceof List )) {
277+ if (forceArray && (content instanceof List ) == false ) {
278278 List <Object > arrayContent = new ArrayList <>();
279279 arrayContent .add (content ); // Add content even if it's null (for empty elements)
280280 return arrayContent ;
@@ -398,7 +398,7 @@ public Iterator<String> getPrefixes(String namespaceURI) {
398398 String targetFieldName = entry .getValue ();
399399
400400 // Validate namespace prefixes if no namespaces are configured
401- if (! hasNamespaces && NAMESPACE_PATTERN .matcher (xpathExpression ).matches ()) {
401+ if (hasNamespaces == false && NAMESPACE_PATTERN .matcher (xpathExpression ).matches ()) {
402402 throw new IllegalArgumentException (
403403 "Invalid XPath expression ["
404404 + xpathExpression
@@ -591,7 +591,7 @@ private class XmlStreamingWithDomHandler extends org.xml.sax.helpers.DefaultHand
591591 private Document domDocument = null ;
592592 private final java .util .Deque <org .w3c .dom .Element > domElementStack = new java .util .ArrayDeque <>();
593593
594- public XmlStreamingWithDomHandler (boolean buildDom ) {
594+ XmlStreamingWithDomHandler (boolean buildDom ) {
595595 this .buildDom = buildDom ;
596596 }
597597
@@ -639,7 +639,7 @@ public void startElement(String uri, String localName, String qName, org.xml.sax
639639 // Build DOM element simultaneously if needed
640640 if (buildDom && domDocument != null ) {
641641 org .w3c .dom .Element domElement ;
642- if (uri != null && ! uri .isEmpty () && ! removeNamespaces ) {
642+ if (uri != null && uri .isEmpty () == false && removeNamespaces == false ) {
643643 domElement = domDocument .createElementNS (uri , qName );
644644 } else {
645645 domElement = domDocument .createElement (removeNamespaces ? localName : qName );
@@ -652,7 +652,7 @@ public void startElement(String uri, String localName, String qName, org.xml.sax
652652 String attrQName = attributes .getQName (i );
653653 String attrValue = attributes .getValue (i );
654654
655- if (attrUri != null && ! attrUri .isEmpty () && ! removeNamespaces ) {
655+ if (attrUri != null && attrUri .isEmpty () == false && removeNamespaces == false ) {
656656 domElement .setAttributeNS (attrUri , attrQName , attrValue );
657657 } else {
658658 domElement .setAttribute (removeNamespaces ? attrLocalName : attrQName , attrValue );
@@ -673,14 +673,14 @@ public void startElement(String uri, String localName, String qName, org.xml.sax
673673 @ Override
674674 public void characters (char [] ch , int start , int length ) throws org .xml .sax .SAXException {
675675 // Add to structured output text accumulator
676- if (! textStack .isEmpty ()) {
676+ if (textStack .isEmpty () == false ) {
677677 textStack .peek ().append (ch , start , length );
678678 }
679679
680680 // Add to DOM text node if needed
681- if (buildDom && ! domElementStack .isEmpty ()) {
681+ if (buildDom && domElementStack .isEmpty () == false ) {
682682 String text = new String (ch , start , length );
683- if (! text .trim ().isEmpty () || ! removeEmptyValues ) {
683+ if (text .trim ().isEmpty () == false || removeEmptyValues == false ) {
684684 org .w3c .dom .Text textNode = domDocument .createTextNode (text );
685685 domElementStack .peek ().appendChild (textNode );
686686 }
@@ -778,7 +778,7 @@ public void endElement(String uri, String localName, String qName) throws org.xm
778778 }
779779
780780 // Complete DOM element if building DOM
781- if (buildDom && ! domElementStack .isEmpty ()) {
781+ if (buildDom && domElementStack .isEmpty () == false ) {
782782 domElementStack .pop ();
783783 }
784784 }
@@ -799,7 +799,7 @@ public Document getDomDocument() {
799799 private String getElementName (String uri , String localName , String qName ) {
800800 String elementName ;
801801 if (removeNamespaces ) {
802- elementName = localName != null && ! localName .isEmpty () ? localName : qName ;
802+ elementName = localName != null && localName .isEmpty () == false ? localName : qName ;
803803 } else {
804804 elementName = qName ;
805805 }
@@ -815,7 +815,7 @@ private String getElementName(String uri, String localName, String qName) {
815815 private String getAttributeName (String uri , String localName , String qName ) {
816816 String attrName ;
817817 if (removeNamespaces ) {
818- attrName = localName != null && ! localName .isEmpty () ? localName : qName ;
818+ attrName = localName != null && localName .isEmpty () == false ? localName : qName ;
819819 } else {
820820 attrName = qName ;
821821 }
0 commit comments