This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | XMLUtil.write lacks newlines in document header on JDK 7u4 | ||
---|---|---|---|
Product: | platform | Reporter: | Jiri Skrivanek <jskrivanek> |
Component: | -- Other -- | Assignee: | Jesse Glick <jglick> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | anebuzelsky, jglick, mmirilovic |
Priority: | P1 | Keywords: | JDK_SPECIFIC |
Version: | 7.0.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 208442 | ||
Attachments: |
Test results.
JavaProjectNatureTest results. WebProjectNatureTest results. |
Description
Jiri Skrivanek
2012-02-27 15:28:59 UTC
Created attachment 116140 [details]
JavaProjectNatureTest results.
Created attachment 116141 [details]
WebProjectNatureTest results.
Please, evaluate also JavaProjectNatureTest and WebProjectNatureTest results. It is similar failure.
Please evaluate ASAP, escalated by JDK team ... we need to know whether it's a random failure, issue in test or problem in JDK. Looks to be a JDK bug. It is failing to insert a newline between the XML declaration and the root element when serializing XML using org.openide.util.XMLUtil.write. I do not see this failure in 7u2. 7u3 I meant. I can reproduce the failures in 7u4. Probably a result of the JAXP upgrade [1] [2]. [1] http://hg.openjdk.java.net/jdk7u/jdk7u/jaxp/rev/d9891683fc16 [2] http://hg.openjdk.java.net/jdk7u/jdk7u/jaxp/rev/4a61ac055189 Not just a test failure of theoretical interest, either; make a new Java Library and you will see that build.xml, build-impl.xml, and project.xml are all missing a newline after the XML declaration, e.g.: <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1"> org.openide.xml.XMLUtilTest shows these failures in a more basic form, by the way - testCopyDocument, testEntityIncludes, testIndentation2, testSignificantWhitespace. Filed upstream bug report. Looking for a workaround in XMLUtil. core-main #15e04e1e6e01 Example of practical impact of bug: http://hg.netbeans.org/main-silver/diff/a53fc85c03e6/o.n.bootstrap/launcher/windows/nbproject/project.xml Not merely a test issue. Integrated into 'main-golden', will be available in build *201203071105* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/15e04e1e6e01 User: Jesse Glick <jglick@netbeans.org> Log: #208909: XMLUtilTest failures on JDK 7u4 Simplifying to use a new transformer property which restores the 7u3 behavior: core-main #921fea600d94 Integrated into 'main-golden', will be available in build *201203170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/921fea600d94 User: Jesse Glick <jglick@netbeans.org> Log: #208909 cont'd: use ORACLE_IS_STANDALONE output processor key. Note that revised fix depends on a JAXP impl honoring ORACLE_IS_STANDALONE, which 1.7.0_04-ea-b11 did not; this change is expected (AFAIK) in the final 7u4 release. releases #8390ab8219ce, releases #5382c0aefa30, releases #20ac295fa225 Integrated into 'releases', will be available in build *201203222205* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/8390ab8219ce User: Jesse Glick <jglick@netbeans.org> Log: #208909: XMLUtilTest failures on JDK 7u4 b18 said to have it. Revised fix confirmed in trunk using 7u4b18. It is still reproducible on Windows with 7u4b20. My test case: - create new java project - go to Files and open build.xml - formatting is as follows <?xml version="1.0" encoding="UTF-8"?><!-- You may freely edit this file. See commented blocks below for --><!-- some examples of how to customize the build. --><!-- (If you delete it and reopen the project it will be recreated.) --><!-- By default, only the Clean and Build commands use this build script. --><!-- Commands such as Run, Debug, and Test only use this build script if --><!-- the Compile on Save feature is turned off for the project. --><!-- You can turn off the Compile on Save (or Deploy on Save) setting --><!-- in the project's Project Properties dialog box.--><project name="JavaApplication3" default="default" basedir="."> <description>Builds, tests, and runs the project JavaApplication3.</description> <import file="nbproject/build-impl.xml"/> Product Version: NetBeans IDE 7.1.2 (Build 201204052205) Java: 1.7.0_04-ea; Java HotSpot(TM) Client VM 23.0-b20 System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb) (In reply to comment #20) > It is still reproducible on Windows with 7u4b20. My test case: > > Product Version: NetBeans IDE 7.1.2 (Build 201204052205) > Java: 1.7.0_04-ea; Java HotSpot(TM) Client VM 23.0-b20 > System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb) Jirka, please doublecheck the version of JDK build, from the text above it looks like you are using b20 - that is confusing, because last build of 7u4 is b19 .... also it says 'ea' and we are almost 'fcs' now It is JDK from here: http://jre.us.oracle.com/java/re/jdk/7u4/promoted/all/b19/bundles/windows-i586/jdk-7u4-ea-bin-b19-windows-i586-05_apr_2012.exe IDE log says: Java; VM; Vendor = 1.7.0_04-ea; Java HotSpot(TM) Client VM 23.0-b20; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.7.0_04-ea-b19 Java Home = D:\jdk1.7.0_04\jre The "b20" is HotSpot; the JRE here is b19. Maybe Windows-specific - did you check also on Linux on Solaris? I will try it on Monday. Never mind, reproduced, this is just not covered by XMLUtilTest yet. Formatting in build.xml and build-impl.xml is actually a separate issue, though of course related to formatting in project.xml. Fixing that too: core-main #a87acbe31c0a, releases #449a2a0cb50f Integrated into 'releases', will be available in build *201204092205* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/449a2a0cb50f User: Jesse Glick <jglick@netbeans.org> Log: #208909: need to use ORACLE_IS_STANDALONE in generateBuildScriptFromStylesheet as well. Verified in NetBeans IDE 7.1.2 (Build 201204092205) and NetBeans IDE Dev (Build 20120410-70b4b50d1de5). Integrated into 'main-golden', will be available in build *201204100400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a87acbe31c0a User: Jesse Glick <jglick@netbeans.org> Log: #208909: need to use ORACLE_IS_STANDALONE in generateBuildScriptFromStylesheet as well. |