RFR 7902086: Add JemmyAWTInput to jemmy/v3

Erik Greijus erik.greijus at oracle.com
Fri Dec 22 10:27:32 UTC 2017


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>:
> Hi,
> Please take a look on initial commit of JemmyAWTInput project.
> Webrev: http://cr.openjdk.java.net/~shurailine/7902086/webrev.01/
> Shura

More information about the jemmy-dev mailing list