Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 98056 - [Encapsulate fields] Encapsulate field on byte with unary operator yields compilation error
[Encapsulate fields] Encapsulate field on byte with unary operator yields com...
Product: java
Classification: Unclassified
Component: Refactoring
All All
: P3 (vote)
: 6.x
Assigned To: Jan Pokorsky
Depends on:
  Show dependency treegraph
Reported: 2007-03-16 04:11 UTC by kely_garcia
Modified: 2007-08-30 10:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description kely_garcia 2007-03-16 04:11:22 UTC
Build ID: 200609161800 (Netbeans 6.0 M3)

Steps To Reproduce:
Encapsulate field b on the following (field b can be of type: byte or short or 
class A {
  byte b;

  void m() {

Yields the following refactored class:
class A {
  private byte b;

  void m() {
    setB(getB() + 1);

    public byte getB() {
        return b;

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

Compilation error is the following: setB(byte) cannot be applied to (int)
Comment 1 Pavel Flaska 2007-03-23 09:05:23 UTC
Encapsulate field refactoring is not available in current builds. It has to be
brought back with fixes.
Comment 2 Jan Pokorsky 2007-08-30 10:45:59 UTC
fixed in

new revision: 1.6; previous revision: 1.5

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo