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 85497 - Generate method hint generates method w/ wrong return type inside a case statement
Summary: Generate method hint generates method w/ wrong return type inside a case stat...
Status: RESOLVED DUPLICATE of bug 82923
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-21 23:00 UTC by _ tboudreau
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2006-09-21 23:00:46 UTC
I have the following method.  None of the validate* methods yet exist;

    public void vetoableChange(PropertyChangeEvent evt) throws
PropertyVetoException {
        int ix = Arrays.asList(props).indexOf (evt.getPropertyName());
        switch (ix) {
            case 0 :
                validateCity( evt.getNewValue() );
                break;
            case 1 :
                validateState( evt.getNewValue() );
                break;
            case 2 :
                validateFirstName( evt.getNewValue() );
                break;
            case 3 :
                validateLastName( evt.getNewValue() );
                break;
            case 4 :
                validateAddress( evt.getNewValue() );
                break;
            case 5 :
                validatePostalCode( evt.getNewValue() );
                break;
            default : 
                throw new IllegalArgumentException (evt.getPropertyName());
        }
    }

When I invoke the create method hint for each of these, I get methods generated
which return int, for some reason:

    private int validateCity(Object object) {
        return 0;
    }

    private int validateState(Object object) {
        return 0;
    }

    private int validateFirstName(Object object) {
        return 0;
    }

    private int validateLastName(Object object) {
        return 0;
    }

    private int validateAddress(Object object) {
        return 0;
    }

    private int validatePostalCode(Object object) {
        return 0;
    }
Comment 1 Jiri Prox 2006-09-22 08:46:53 UTC
It's duplicate of issue 82923, thanks for your report

*** This issue has been marked as a duplicate of 82923 ***