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 169249

Summary: [Encapsulate field] Ignore invalid statement
Product: java Reporter: Jiri Prox <jiriprox>
Component: RefactoringAssignee: Jan Becicka <jbecicka>
Status: NEW ---    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jiri Prox 2009-07-27 17:00:33 UTC
Product Version: NetBeans IDE Dev (Build 200907270201)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)

The invalid or incomplete field declaration can be omitted from encapsulate field dialog.

Example:
1) have a class with incomplete declaration (e.g. there is syntax error in it):
class Test {
 a;
}


2) call Encapsulate Field refactoring

-> the refactoring tries to guess getter and setter name form the invalid declaration.
If suggest get<error> and set<error> which is invalid identifier and the refactoring cannot continue