Details
-
Bug
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
11.3
-
None
-
None
-
Mac OS Catalina, Netbeans 11.3
-
Important
Description
Error "incompatible types - Object cannot be converted to HsOwnr" when in fact it can and should be.
Example:
public class HsHndlr {
...
public static ArrayList<HsOwnr> altrngHsOwnrs = null;
...
static class HsOwnr {
...
}
}
public class AppCnvsMIA {
...
for ( HsHndlr.HsOwnr altrngOwnr : HsHndlr.altrngHsOwnrs ) {
...
}
}
The above give the error. But a compile (Clean and Build) is successful - no errors in the compile and build. The error is removed when the following is done.
public class AppCnvsMIA {
...
// for ( HsHndlr.HsOwnr altrngOwnr : HsHndlr.altrngHsOwnrs ) {
ArrayList<HsHndlr.HsOwnr> localOwnrsList = HsHndlr.altrngHsOwnrs;
for ( HsHndlr.HsOwnr altrngOwnr : localOwnrsList ) {
...
}
}
This error just cropped up within the last week or so, and I have made no upgrades to the Netbeans environment in months. I think some "automatic" update may have occurred, but I don't know how that could be.