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.
When creating a master/detail form in the JDA wizard, the main view's newDetailRecord() method always has a local variable of type Collection generated, even if it is assigned the value of a List, and then has to be cast to List later in the method, e.g. Collection<desktopapplication2.Orders> os = c.getOrdersCollection(); if (os == null) { os = new LinkedList<desktopapplication2.Orders>(); c.setOrdersCollection((List)os); } (where getOrdersCollection() returns a List) could be changed to: List<desktopapplication2.Orders> os = c.getOrdersCollection(); if (os == null) { os = new LinkedList<desktopapplication2.Orders>(); c.setOrdersCollection(os); } issue 151977 filed to rename the OrdersCollection field to OrdersList in these cases
>> where getOrdersCollection() returns a List, could be changed to ... ?? If getOrdersCollection() method returns a list, control jumps to the end of that "if" statement and skips that two lines. From my point of view "problem" is only inside that IF ... os = new LinkedList<desktopapplication2.Orders>(); // "os" WILL contain List c.setOrdersCollection((List)os); // no need to cast "os" to List Did I understand your report correctly?
Oups, Jan Stola helped me to understand your report. It's about return "type" of getOrdersCollection() and redundant cast, so please skip my last comment. :)