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.
Product Version = NetBeans IDE 8.0 (Build 201403101706) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70 String str = ".....some String....."; int random = radom_value; the line: str += random_value; does not give a warning possibility. It is adding an integer, which in java will be converted to a String to the str value, but in C has much different meaning when str is a pointer.
Is this a bug on C++ or Java?
A notice when converting c/c++ code to Java. It is not an error, but that holds true for all warnings.
I mean where do you expect to see a warning? In Java code or in C/C++ code? Anyway, I suppose that such warning would be quite weird - any c/c++ programmer knows that char* is a pointer and adding integer to it just moves the pointer (as well as that adding it to the std::string converts integer to char and appends the string). On the contrary, anyone who used to write in Java knows that adding integer to a String actually appends string with an integer value. Those things are part of a language or well known behavior of classes from standard libraries.
I do not think it is weird, because when one uses warnings to look for potentially wrong code, and the translation from c to Java would mean that this line should be adjusted, it is a correct warning. Why should this warning be different from others? The warning should be available for Java coding, as this error would occur when converting c code to Java. Of course do those who use just a single language know about the difference, but is that not the same for all the other warnings?