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 245318

Summary: Method inline refactoring removes class-level comments
Product: java Reporter: Maksim Khramov <mkhramov>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: RESOLVED FIXED    
Severity: normal CC: ralphbenjamin, sdedic
Priority: P2    
Version: 8.0.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 239487    
Bug Blocks:    

Description Maksim Khramov 2014-06-30 11:40:37 UTC
Product Version: NetBeans IDE Dev (Build 201406300002)
Java: 1.8.0_25-ea; Java HotSpot(TM) 64-Bit Server VM 25.25-b01
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-ea-b01

Steps to reporoduce:

Create new class to test:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication17;

/**
 * <p>
 * Page bean that corresponds to a similarly named JSP page.
 *
 * @author Author
 */
//@ManagedBean(name="SomeBean")
//@RequestScoped
public class JavaApplication17 {


    public static void main(String[] args) {
        // TODO code application logic here
        methodToInline();
    }
    
    private static void methodToInline() {
        System.out.println("To be inlined;");
    }
    
}

Invoke inline method refactoring.
The comments before class are disappears
Comment 1 Svata Dedic 2014-07-02 08:41:44 UTC
Can be fixed in java code generator.
Comment 2 Svata Dedic 2014-07-10 14:28:12 UTC
Fixed by general support implemented as part of issue #239487 and isssue #245348