Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 177182

Summary: [encapsulate field] Encapsulate field on byte with unary operator yields compilation error
Product: [Eclipse Project] JDT Reporter: Brett Daniel <bdaniel3>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Brett Daniel CLA 2007-03-13 13:40:02 EDT
Build ID: I20070222-0951

Steps To Reproduce:
Encapsulate field b on the following:

class A {
  byte b;
	
  void m() {
    b++;
  }
}

Yields the following refactored class:

class A {
	private byte b;
	
	void m() {
		setB(getB() + 1);
	}

	void setB(byte b) {
		this.b = b;
	}

	byte getB() {
		return b;
	}
}

Compilation error is the following: The method setTheField(Byte) in the type A is not applicable for the arguments (int).

More information:
Comment 1 Eclipse Genie CLA 2020-02-02 19:47:00 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.