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.

Bug 269073 - XML formatting doesn't work due to comments with blank lines
Summary: XML formatting doesn't work due to comments with blank lines
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 8.2
Hardware: PC Other
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 179335 258737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-22 13:20 UTC by terje7601
Modified: 2017-03-16 02:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2016-11-22 13:20:02 UTC
To reproduce, create an XML file with the content below. Upon formatting, all lines (or at least both root tags) should be moved to the beginning of the line. However, only the end tag of root is moved. NetBeans can't handle the fact that the comment contains a blank line.



<?xml version="1.0" encoding="UTF-8"?>
    <root>
    <!--
 
    -->    
    </root>


Product Version: NetBeans IDE 8.2 (Build 201609300101)
Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13
System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
Comment 1 Svata Dedic 2017-03-14 09:36:49 UTC
Fixed in jet-main#7f5d303dca1
Comment 2 Svata Dedic 2017-03-14 09:37:07 UTC
*** Bug 258737 has been marked as a duplicate of this bug. ***
Comment 3 Svata Dedic 2017-03-14 09:51:23 UTC
*** Bug 179335 has been marked as a duplicate of this bug. ***
Comment 4 Quality Engineering 2017-03-16 02:50:32 UTC
Integrated into 'main-silver', will be available in build *201703160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/97f5d303dca1
User: Svata Dedic <sdedic@netbeans.org>
Log: #269073: fixed formatter abort on comments with blank lines (exception swallowed)