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 54571

Summary: beans with generic (parameterized) properties no longer recognized as beans
Product: java Reporter: xxiii <xxiii>
Component: BeansAssignee: issues@java <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description xxiii 2005-02-04 19:45:32 UTC
Beans containing things like List<SomeClass>
someProperty; disable the "Add" context menu item
on Bean patterns, and also associated refactoring.
Comment 1 xxiii 2005-02-04 19:59:09 UTC
This is fine:

package net.relia.wirelessUI.db;

import java.beans.*;
import java.io.Serializable;
import java.util.*;

public class ttt extends Object implements Serializable {

    private List _listProp;
    
    public ttt() {
    }

    public List getListProp() {

        return _listProp;
    }

    public void setListProp(List listProp) {

        _listProp = listProp;
    }
}


This is not:


package net.relia.wirelessUI.db;

import java.beans.*;
import java.io.Serializable;
import java.util.*;

public class ttt extends Object implements Serializable {

    private List<String> _listProp;
    
    public ttt() {
    }

    public List<String> getListProp() {

        return _listProp;
    }

    public void setListProp(List<String> listProp) {

        _listProp = listProp;
    }
}

Beaninfo can still be brought up, but it seems confused (it thinks the
property has a getter but no setter). In some of my real world
classes, Beaninfo Editor... is also greyed out.

Also trying to create the property in the first place via "Bean
Patterns->Add->Property", by putting List<String> in as the type
results in "The specified type is not valid".
Comment 2 Jan Pokorsky 2005-02-07 12:32:34 UTC
already fixed in nb 4.1

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