RFR 7902086: Add JemmyAWTInput to jemmy/v3
Alexandre (Shura) Iline
alexandre.iline at oracle.com
Fri Dec 22 20:43:07 UTC 2017
There are so many places where I would do things differently if I develop that code right now …
Including the problems you mentioned, which is just a tip of the iceberg. There are fundamental design problems too.
I am right now just trying to push the code which was available before with the minor tweaks such as removing deprecated API.
Regardless, I have made a quick scan, picked up a few low hanging fruits on the way.
I am suggesting to push it is this state. Please let me know if for whatever reason that is not acceptable.
Also I suggest to file separate bugs for additional required fixes.
> On Dec 22, 2017, at 2:27 AM, Erik Greijus <erik.greijus at oracle.com> wrote:
> There are some classes where methods could be annotated as overridden (for clarity and to make sure that these are properly overridden and not accidentally overloaded):
> AWTImage line 102: "private BufferedImage image;" can be final.
> The import of java.awt.image.BufferedImage in class AverageDistanceImageComparator seems to be unused.
> DiffDialog line 49: "private final static StrictImageComparator comparator = new StrictImageComparator();" doesn't follow naming conventions for constants.
> The following imports in NaturalImageComparator seem to be unused:
> import java.awt.Color;
> import java.awt.image.BufferedImage;
> import org.jemmy.image.pixel.AverageDistanceComparator;
> The following imports in ResizeImageComparator seem to be unused:
> import org.jemmy.image.pixel.Raster;
> import org.jemmy.image.pixel.RasterComparator;
> In AWTMap line 59 the assignment "int key = KeyEvent.VK_UNDEFINED;" seems to never be used (handled by following if-else)
> In ClassReference lines 37 and 38 fields "private Class<?> cl;" and "private Object instance;" can be final.
> The following imports in DragImpl seem to be unused:
> import java.awt.event.InputEvent;
> import org.jemmy.env.Timeout;
> import org.jemmy.interfaces.Mouse;
> -and on line 57 "private Wrap<?> source;" can be final
> In MouseImpl lines 43 and 44 fields "private Wrap<?> target;" and "private RobotDriver robotDriver;" can be final.
> The following imports in RobotDriver seem to be unused:
> import java.util.HashMap;
> import org.jemmy.interfaces.Button;
> import org.jemmy.interfaces.Mouse.MouseButtons;
> import org.jemmy.interfaces.Mouse.MouseModifiers;
> In RobotExecutor line 184 the assignment "private static final Set<String> convertables =...." doesn't follow naming conventions for constants.
> In Version line 31 the constant hides another field. If on purpose maybe document why?
> Best regards
>> 21 dec. 2017 kl. 18:20 skrev Alexandre (Shura) Iline <alexandre.iline at oracle.com <mailto:alexandre.iline at oracle.com>>:
>> Please take a look on initial commit of JemmyAWTInput project.
>> Webrev: http://cr.openjdk.java.net/~shurailine/7902086/webrev.01/ <http://cr.openjdk.java.net/~shurailine/7902086/webrev.01/>
More information about the jemmy-dev