Changeset 10244 in josm


Ignore:
Timestamp:
2016-05-17T17:58:09+02:00 (4 years ago)
Author:
Don-vip
Message:

findbugs - BIT_SIGNED_CHECK

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java

    r10181 r10244  
    8585                done = true;
    8686            } else {
    87                 long x = 0, y = 0;
     87                long x = 0;
     88                long y = 0;
    8889                outcodeOut = outcode0 != 0 ? outcode0 : outcode1;
    89                 if ((outcodeOut & OUT_TOP) > 0) {
     90                if ((outcodeOut & OUT_TOP) != 0) {
    9091                    x = x1 + (x2 - x1) * (ymax - y1)/(y2 - y1);
    9192                    y = ymax;
    92                 } else if ((outcodeOut & OUT_BOTTOM) > 0) {
     93                } else if ((outcodeOut & OUT_BOTTOM) != 0) {
    9394                    x = x1 + (x2 - x1) * (ymin - y1)/(y2 - y1);
    9495                    y = ymin;
    95                 } else if ((outcodeOut & OUT_RIGHT) > 0) {
     96                } else if ((outcodeOut & OUT_RIGHT) != 0) {
    9697                    y = y1 + (y2 - y1) * (xmax - x1)/(x2 - x1);
    9798                    x = xmax;
    98                 } else if ((outcodeOut & OUT_LEFT) > 0) {
     99                } else if ((outcodeOut & OUT_LEFT) != 0) {
    99100                    y = y1 + (y2 - y1) * (xmin - x1)/(x2 - x1);
    100101                    x = xmin;
  • trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java

    r10217 r10244  
    9090
    9191        // UP
    92         if ((direction & UP_DIRECTION) > 0) {
     92        if ((direction & UP_DIRECTION) != 0) {
    9393            button = new JButton();
    9494            button.addMouseListener(new ScrollViewPortMouseListener(UP_DIRECTION));
     
    100100
    101101        // DOWN
    102         if ((direction & DOWN_DIRECTION) > 0) {
     102        if ((direction & DOWN_DIRECTION) != 0) {
    103103            button = new JButton();
    104104            button.addMouseListener(new ScrollViewPortMouseListener(DOWN_DIRECTION));
     
    110110
    111111        // LEFT
    112         if ((direction & LEFT_DIRECTION) > 0) {
     112        if ((direction & LEFT_DIRECTION) != 0) {
    113113            button = new JButton();
    114114            button.addMouseListener(new ScrollViewPortMouseListener(LEFT_DIRECTION));
     
    120120
    121121        // RIGHT
    122         if ((direction & RIGHT_DIRECTION) > 0) {
     122        if ((direction & RIGHT_DIRECTION) != 0) {
    123123            button = new JButton();
    124124            button.addMouseListener(new ScrollViewPortMouseListener(RIGHT_DIRECTION));
  • trunk/src/org/openstreetmap/josm/gui/SelectionManager.java

    r10173 r10244  
    201201        if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() > 1 && Main.main.getCurrentDataSet() != null) {
    202202            SelectByInternalPointAction.performSelection(Main.map.mapView.getEastNorth(e.getX(), e.getY()),
    203                     (e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) > 0,
    204                     (e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) > 0);
     203                    (e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) != 0,
     204                    (e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) != 0);
    205205        } else if (e.getButton() == MouseEvent.BUTTON1) {
    206206            mousePosStart = mousePos = e.getPoint();
Note: See TracChangeset for help on using the changeset viewer.