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 237313 - Manual array copy remove previous comments
Summary: Manual array copy remove previous comments
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-18 12:38 UTC by david_kral
Modified: 2014-03-26 17:04 UTC (History)
1 user (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 david_kral 2013-10-18 12:38:52 UTC
Product Version: NetBeans IDE 7.4 (Build 201310101600)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 8 version 6.2 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\David\AppData\Roaming\NetBeans\7.4
Cache directory: C:\Users\David\AppData\Local\NetBeans\Cache\7.4

Steps to reproduce:
1. create method and paste inside this code:
        String[] str = new String[10];
        String[] str1 = new String[12];
        /*koment1
          koment2
          koment3*/
        for (int i = 0; i < str.length; i++) {
            str1[i] = str[i];
        }
2. Allow netbeans to replace your for loop with System.arraycopy()
3. Your previous comment disappears (this problem is also for single line comment)
Comment 1 Svata Dedic 2013-11-25 15:29:45 UTC
Uses RewriteFix. Fixed in http://hg.netbeans.org/jet-main/rev/c6f518969ecb
Comment 2 Jiri Prox 2013-12-03 11:49:50 UTC
verified in trunk
Comment 3 Svata Dedic 2013-12-13 13:26:19 UTC
Grafted into 7.4 as #4d90f068f418
Comment 4 Quality Engineering 2014-03-26 17:04:44 UTC
Integrated into 'releases/release74', will be available in build *201403261440* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/4d90f068f418
User: Svata Dedic <sdedic@netbeans.org>
Log: #237313, #234134: rewrite fix preserves comments for (only!) the replaced nodes