Actions
Bug #11089
open
RS
equals functions are not translated properly
Bug #11089:
equals functions are not translated properly
Start date:
11/21/2022
Due date:
% Done:
0%
Estimated time:
Description
We turn the following C++:
into:
As a consequence, Object#equals is not properly overridden.
We should turn it into something like:
public class C {
@Override
public boolean equals(Object otherObject) {
if (!(otherObject instanceof C)) {
return false;
}
final C other = (C)otherObject;
...
}
}
One function that is affected by this issue is WApplication#require. If require is called twice:
This also generates JavaScript like:
Wt._p_.loadScript('lib.js', '');
Wt._p_.onJsLoad('lib.js', function() {
Wt._p_.loadScript('lib.js', '');
Wt._p_.onJsLoad('lib.js', function() {
...
Instead, it should be:
Related to this is the fact that hashCode is rarely properly overridden.
No data to display
Actions