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 254902

Summary: Pull Up Method Refactoring makes a class abstract
Product: java Reporter: melmongiovi
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description melmongiovi 2015-09-01 11:27:21 UTC
Applying pull up method refactoring to move B.m to class A, makes A abstract.
Making a class abstract may be not safe in some domains, such as, library (API) developments.  Even, in other domains, the developer may not want to make a class abstract. I think at least NetBeans should report a message to alloy the user choosing between make a class abstract or give up the transformation.

Before Refactoring:

public class A {}
abstract class B extends A {
  public abstract int m(int a);
}


Resulting Program:

public abstract class A {
  public abstract int m(int a); 
}

abstract class B extends A {}