Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package domtrip for openSUSE:Factory checked 
in at 2026-06-04 18:55:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/domtrip (Old)
 and      /work/SRC/openSUSE:Factory/.domtrip.new.2375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "domtrip"

Thu Jun  4 18:55:25 2026 rev:2 rq:1357055 version:1.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/domtrip/domtrip.changes  2026-05-27 
16:20:51.390469823 +0200
+++ /work/SRC/openSUSE:Factory/.domtrip.new.2375/domtrip.changes        
2026-06-04 18:57:22.480453023 +0200
@@ -1,0 +2,11 @@
+Thu Jun  4 05:05:03 UTC 2026 - Fridrich Strba <[email protected]>
+
+- Update to upstream version 1.5.2
+  * This version makes addBlankLineBefore() and addBlankLineAfter()
+    idempotent, preventing double blank lines when inserting
+    elements into positions that already have visual separation.
+- Modified patch:
+  * domtrip-ant-build-system.patch
+    + Adapt to the version change
+
+-------------------------------------------------------------------

Old:
----
  1.5.1.tar.gz

New:
----
  1.5.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ domtrip.spec ++++++
--- /var/tmp/diff_new_pack.K15ruu/_old  2026-06-04 18:57:23.300486894 +0200
+++ /var/tmp/diff_new_pack.K15ruu/_new  2026-06-04 18:57:23.304487059 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           domtrip
-Version:        1.5.1
+Version:        1.5.2
 Release:        0
 Summary:        Lossless XML Editing for Java
 License:        EPL-2.0

++++++ 1.5.1.tar.gz -> 1.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/domtrip-1.5.1/.mvn/extensions.xml 
new/domtrip-1.5.2/.mvn/extensions.xml
--- old/domtrip-1.5.1/.mvn/extensions.xml       2026-05-19 09:14:31.000000000 
+0200
+++ new/domtrip-1.5.2/.mvn/extensions.xml       2026-05-28 07:41:57.000000000 
+0200
@@ -3,6 +3,6 @@
   <extension>
     <groupId>eu.maveniverse.maven.nisse</groupId>
     <artifactId>extension</artifactId>
-    <version>0.8.4</version>
+    <version>0.9.1</version>
   </extension>
 </extensions>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/domtrip-1.5.1/core/src/main/java/eu/maveniverse/domtrip/Editor.java 
new/domtrip-1.5.2/core/src/main/java/eu/maveniverse/domtrip/Editor.java
--- old/domtrip-1.5.1/core/src/main/java/eu/maveniverse/domtrip/Editor.java     
2026-05-19 09:14:31.000000000 +0200
+++ new/domtrip-1.5.2/core/src/main/java/eu/maveniverse/domtrip/Editor.java     
2026-05-28 07:41:57.000000000 +0200
@@ -2091,21 +2091,42 @@
     }
 
     public void addBlankLineBefore(Element element) {
-        element.precedingWhitespace(lineEnding + 
element.precedingWhitespace());
+        String ws = element.precedingWhitespace();
+        if (!hasBlankLine(ws)) {
+            element.precedingWhitespace(lineEnding + ws);
+        }
     }
 
     public void addBlankLineAfter(Element element) {
-        // Add an extra newline to create a blank line
         if (element.parent() instanceof Element) {
             Element parentElement = (Element) element.parent();
             int index = parentElement.children.indexOf(element);
             if (index == parentElement.children.size() - 1) {
-                parentElement.innerPrecedingWhitespace(lineEnding + 
parentElement.innerPrecedingWhitespace());
+                String ws = parentElement.innerPrecedingWhitespace();
+                if (!hasBlankLine(ws)) {
+                    parentElement.innerPrecedingWhitespace(lineEnding + ws);
+                }
             } else {
                 Node nextSibling = parentElement.children.get(index + 1);
-                nextSibling.precedingWhitespace(lineEnding + 
nextSibling.precedingWhitespace());
+                String ws = nextSibling.precedingWhitespace();
+                if (!hasBlankLine(ws)) {
+                    nextSibling.precedingWhitespace(lineEnding + ws);
+                }
+            }
+        }
+    }
+
+    private boolean hasBlankLine(String whitespace) {
+        if (whitespace == null || lineEnding.isEmpty()) {
+            return false;
+        }
+        String[] lines = whitespace.split(lineEnding, -1);
+        for (int i = 1; i < lines.length - 1; i++) {
+            if (lines[i].trim().isEmpty()) {
+                return true;
             }
         }
+        return false;
     }
 
     /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/domtrip-1.5.1/core/src/test/java/eu/maveniverse/domtrip/EditorInsertRemoveTest.java
 
new/domtrip-1.5.2/core/src/test/java/eu/maveniverse/domtrip/EditorInsertRemoveTest.java
--- 
old/domtrip-1.5.1/core/src/test/java/eu/maveniverse/domtrip/EditorInsertRemoveTest.java
     2026-05-19 09:14:31.000000000 +0200
+++ 
new/domtrip-1.5.2/core/src/test/java/eu/maveniverse/domtrip/EditorInsertRemoveTest.java
     2026-05-28 07:41:57.000000000 +0200
@@ -245,6 +245,85 @@
     }
 
     @Test
+    void testAddBlankLineBeforeIsIdempotent() throws DomTripException {
+        String xml = """
+            <root>
+                <existing>content</existing>
+
+                <other>value</other>
+            </root>""";
+
+        Document doc = Document.of(xml);
+        editor = new Editor(doc);
+        Element other = doc.root().childElement("other").orElseThrow();
+
+        editor.addBlankLineBefore(other);
+        String result = editor.toXml();
+
+        assertEquals(xml, result);
+    }
+
+    @Test
+    void testAddBlankLineAfterIsIdempotent() throws DomTripException {
+        String xml = """
+            <root>
+                <existing>content</existing>
+
+                <other>value</other>
+            </root>""";
+
+        Document doc = Document.of(xml);
+        editor = new Editor(doc);
+        Element existing = doc.root().childElement("existing").orElseThrow();
+
+        editor.addBlankLineAfter(existing);
+        String result = editor.toXml();
+
+        assertEquals(xml, result);
+    }
+
+    @Test
+    void testAddBlankLineBeforeIsIdempotentWithWhitespaceOnlyBlankLine() 
throws DomTripException {
+        String xml = "<root>\n    <existing>content</existing>\n    \n    
<other>value</other>\n</root>";
+
+        Document doc = Document.of(xml);
+        editor = new Editor(doc);
+        Element other = doc.root().childElement("other").orElseThrow();
+
+        editor.addBlankLineBefore(other);
+        String result = editor.toXml();
+
+        assertEquals(xml, result);
+    }
+
+    @Test
+    void testAddBlankLineAfterIsIdempotentWithWhitespaceOnlyBlankLine() throws 
DomTripException {
+        String xml = "<root>\n    <existing>content</existing>\n    \n    
<other>value</other>\n</root>";
+
+        Document doc = Document.of(xml);
+        editor = new Editor(doc);
+        Element existing = doc.root().childElement("existing").orElseThrow();
+
+        editor.addBlankLineAfter(existing);
+        String result = editor.toXml();
+
+        assertEquals(xml, result);
+    }
+
+    @Test
+    void testAddBlankLineBeforeNoOpForRawFormatting() throws DomTripException {
+        String xml = 
"<root><existing>content</existing><other>value</other></root>";
+
+        Document doc = Document.of(xml);
+        editor = new Editor(doc);
+        Element other = doc.root().childElement("other").orElseThrow();
+
+        editor.addBlankLineBefore(other);
+
+        assertEquals(xml, editor.toXml());
+    }
+
+    @Test
     void testRemoveElementNullHandling() throws DomTripException {
         // Test null element
         assertFalse(editor.removeElement(null));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/domtrip-1.5.1/pom.xml new/domtrip-1.5.2/pom.xml
--- old/domtrip-1.5.1/pom.xml   2026-05-19 09:14:31.000000000 +0200
+++ new/domtrip-1.5.2/pom.xml   2026-05-28 07:41:57.000000000 +0200
@@ -14,7 +14,7 @@
   <parent>
     <groupId>eu.maveniverse.maven.parent</groupId>
     <artifactId>parent</artifactId>
-    <version>52</version>
+    <version>53</version>
   </parent>
 
   <groupId>eu.maveniverse.maven.domtrip</groupId>
@@ -41,7 +41,7 @@
     <maven.compiler.release>8</maven.compiler.release>
     <maven.compiler.testRelease>21</maven.compiler.testRelease>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <version.junit>6.0.3</version.junit>
+    <version.junit>6.1.0</version.junit>
   </properties>
 
 </project>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/domtrip-1.5.1/website/pom.xml 
new/domtrip-1.5.2/website/pom.xml
--- old/domtrip-1.5.1/website/pom.xml   2026-05-19 09:14:31.000000000 +0200
+++ new/domtrip-1.5.2/website/pom.xml   2026-05-28 07:41:57.000000000 +0200
@@ -23,8 +23,8 @@
   <properties>
     <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
     <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
-    <version.quarkus.platform>3.35.3</version.quarkus.platform>
-    <version.quarkus-roq>2.1.1</version.quarkus-roq>
+    <version.quarkus.platform>3.36.0</version.quarkus.platform>
+    <version.quarkus-roq>2.1.2</version.quarkus-roq>
   </properties>
 
   <dependencyManagement>

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.K15ruu/_old  2026-06-04 18:57:23.676502424 +0200
+++ /var/tmp/diff_new_pack.K15ruu/_new  2026-06-04 18:57:23.684502755 +0200
@@ -1,6 +1,6 @@
-mtime: 1779875643
-commit: 79d20fc81a7bc9cc8618bcfa29c34f4b8e55a3c952a0c16990ad54c5380dea65
+mtime: 1780549738
+commit: 10c2c2b5c684191d726eca7b420a3323b57ffad7713b6e7799f4d394057e6276
 url: https://src.opensuse.org/java-packages/domtrip
-revision: 79d20fc81a7bc9cc8618bcfa29c34f4b8e55a3c952a0c16990ad54c5380dea65
+revision: 10c2c2b5c684191d726eca7b420a3323b57ffad7713b6e7799f4d394057e6276
 projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-06-04 07:08:58.000000000 +0200
@@ -0,0 +1,5 @@
+*.obscpio
+*.osc
+_build.*
+_service:*
+.pbuild

++++++ domtrip-ant-build-system.patch ++++++
--- /var/tmp/diff_new_pack.K15ruu/_old  2026-06-04 18:57:23.904511842 +0200
+++ /var/tmp/diff_new_pack.K15ruu/_new  2026-06-04 18:57:23.908512007 +0200
@@ -84,7 +84,7 @@
 +<project name="common" basedir=".">
 +
 +  <property file="build.properties"/>
-+  <property name="project.version" value="1.5.1"/>
++  <property name="project.version" value="1.5.2"/>
 +  <property name="project.groupId" value="eu.maveniverse.maven.domtrip"/>
 +
 +  <property name="project.organization.name" value="Maveniverse Team"/>

Reply via email to