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 270942

Summary: Maven POM editor adds a superfluous final tag inside dependencies element after auto-completion if no text is entered after initial tag
Product: ide Reporter: wissenstein <wissenstein>
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 10   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description wissenstein 2017-06-23 11:26:03 UTC
Product Version = NetBeans IDE Dev (Build 201706220001)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_131
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.131-b11

Reproducibility: Happens every time

STEPS:
  * Create a Maven project.
  * Open its pom.xml descriptor
  * Add a new element /project/dependencies/dependency. There are tags <depencencies><dependency></dependency></dependencies> in pom.xml in this order.
  * Put the caret between the tags <depencency> and </dependency>
  * Add tags <groupId></groupId>.
  * Enter letter "H" between the tags created on the previous step and press Ctrl+Space. A list of auto-completion advices is shown. "HTTPClient" is available to choose.
  * Choose "HTTPClient" in the list. The document contains the following fragment now: "<groupId>HTTPClient</groupId>".
  * Delete the groupId element created on the previous step and put the caret between the tags <depencency> and </dependency>.
  * Add tags <groupId></groupId>.
  * Put the caret between the tags created on the previous step and press Ctrl+Space. A list of auto-completion advices is shown.
  * Choose "HTTPClient" in the list with the down-arrow key and press Enter.

ACTUAL:
  The document contains the following fragment now: "<groupId>HTTPClient</groupId></groupId>".

EXPECTED:
  The document contains fragment "<groupId>HTTPClient</groupId>" without duplicating tag "</groupId>".

The same for <artifactId>, <version> tags (and may be for other tags).
Comment 1 wissenstein 2017-06-23 11:26:09 UTC
Created attachment 164607 [details]
IDE log