Ignore:
Timestamp:
2015-05-16T15:13:38+02:00 (10 years ago)
Author:
Don-vip
Message:

fix Findbugs performance issues

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java

    r8290 r8365  
    7272        int height = -1;
    7373        if (offsetRight > 0 && offsetLeft > 0) {
    74             width = new Double(w*(offsetRight-offsetLeft)).intValue();
     74            width = (int) (w*(offsetRight-offsetLeft));
    7575        }
    7676        if (offsetTop > 0 && offsetBottom > 0) {
    77             width = new Double(h*(offsetBottom-offsetTop)).intValue();
     77            width = (int) (h*(offsetBottom-offsetTop));
    7878        }
    7979        ImageIcon overlay;
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r8291 r8365  
    187187            final Matcher m = Pattern.compile("(\\d+)x(\\d+)(([+-])(\\d+)([+-])(\\d+))?").matcher(arg);
    188188            if (m.matches()) {
    189                 int w = Integer.valueOf(m.group(1));
    190                 int h = Integer.valueOf(m.group(2));
     189                int w = Integer.parseInt(m.group(1));
     190                int h = Integer.parseInt(m.group(2));
    191191                int x = screenDimension.x, y = screenDimension.y;
    192192                if (m.group(3) != null) {
    193                     x = Integer.valueOf(m.group(5));
    194                     y = Integer.valueOf(m.group(7));
     193                    x = Integer.parseInt(m.group(5));
     194                    y = Integer.parseInt(m.group(7));
    195195                    if ("-".equals(m.group(4))) {
    196196                        x = screenDimension.x + screenDimension.width - x - w;
Note: See TracChangeset for help on using the changeset viewer.