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 257693

Summary: Code format fails silently if comment contains empty line
Product: xml Reporter: _ gtzabari <gtzabari>
Component: CodeAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:

Description _ gtzabari 2016-01-23 21:51:33 UTC
Product Version: NetBeans IDE Dev (Build 201601210002)
Java: 1.8.0_71; Java HotSpot(TM) 64-Bit Server VM 25.71-b15
Runtime: Java(TM) SE Runtime Environment 1.8.0_71-b15
System: Windows 10 version 10.0 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

Invoking code-format fails silently on XML files that contain an empty comment.

For example, code-format works fine on:

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

but if fails (nothing happens) if invoked against:

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

	-->
</root>

This is reproducible 100% of the time.