We're updating the issue view to help you get more done. 

Updates to pom continually adds superfluous newlines under Java 9

Description

Under Java 9, each invocation of `clj -Spom` to update an existing pom causes newlines to be added.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 /private/tmp/pom-bug> head pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pom-bug</groupId> <artifactId>pom-bug</artifactId> <version>0.1.0</version> <name>pom-bug</name> <dependencies> <dependency> <groupId>org.clojure</groupId> /private/tmp/pom-bug> clj -Spom 2>/dev/null /private/tmp/pom-bug> head pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pom-bug</groupId> <artifactId>pom-bug</artifactId> <version>0.1.0</version> /private/tmp/pom-bug> clj -Spom 2>/dev/null /private/tmp/pom-bug> head pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pom-bug</groupId>

It's worth noting that this happens only under Java 9. Java 1.8.0_152 works as expected.

Environment

version: 1.9.0.297

java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Status

Assignee

Alex Miller

Reporter

Timothy Pote

Labels

None

Approval

None

Patch

None

Priority

Minor