Changeset 11331 in josm
- Timestamp:
- 2016-11-28T01:35:12+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/BufferedImageCacheEntry.java
r10938 r11331 44 44 return img; 45 45 byte[] content = getContent(); 46 if (content != null && content.length > 0) {46 if (content.length > 0) { 47 47 img = ImageIO.read(new ByteArrayInputStream(content)); 48 48 imageLoaded = true; -
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r11288 r11331 196 196 return false; 197 197 } 198 byte[] content = cacheData.getContent(); 199 return content != null && content.length > 0; 198 return cacheData.getContent().length > 0; 200 199 } 201 200 -
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
r11288 r11331 124 124 byte[] content = cacheData.getContent(); 125 125 try { 126 return content != null|| cacheData.getImage() != null || isNoTileAtZoom();126 return content.length > 0 || cacheData.getImage() != null || isNoTileAtZoom(); 127 127 } catch (IOException e) { 128 128 LOG.log(Level.WARNING, "JCS TMS - error loading from cache for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()}); … … 325 325 if (object != null) { 326 326 byte[] content = object.getContent(); 327 if (content != null && content.length > 0) {327 if (content.length > 0) { 328 328 tile.loadImage(new ByteArrayInputStream(content)); 329 329 if (tile.getImage() == null) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMerger.java
r11330 r11331 490 490 public void actionPerformed(ActionEvent e) { 491 491 int[] mergedRows = mergedEntriesTable.getSelectedRows(); 492 if (mergedRows == null || mergedRows.length == 0)492 if (mergedRows.length == 0) 493 493 return; 494 494 int[] myRows = myEntriesTable.getSelectedRows(); … … 520 520 public void actionPerformed(ActionEvent e) { 521 521 int[] mergedRows = mergedEntriesTable.getSelectedRows(); 522 if (mergedRows == null || mergedRows.length == 0)522 if (mergedRows.length == 0) 523 523 return; 524 524 int[] myRows = myEntriesTable.getSelectedRows(); … … 582 582 public void actionPerformed(ActionEvent e) { 583 583 int[] mergedRows = mergedEntriesTable.getSelectedRows(); 584 if (mergedRows == null || mergedRows.length == 0)584 if (mergedRows.length == 0) 585 585 return; 586 586 int[] myRows = theirEntriesTable.getSelectedRows(); … … 608 608 public void actionPerformed(ActionEvent e) { 609 609 int[] mergedRows = mergedEntriesTable.getSelectedRows(); 610 if (mergedRows == null || mergedRows.length == 0)610 if (mergedRows.length == 0) 611 611 return; 612 612 int[] myRows = theirEntriesTable.getSelectedRows(); … … 703 703 public void valueChanged(ListSelectionEvent e) { 704 704 int[] rows = mergedEntriesTable.getSelectedRows(); 705 setEnabled( 706 rows != null 707 && rows.length > 0 705 setEnabled(rows.length > 0 708 706 && rows[0] != 0 709 707 ); … … 737 735 public void valueChanged(ListSelectionEvent e) { 738 736 int[] rows = mergedEntriesTable.getSelectedRows(); 739 setEnabled( 740 rows != null 741 && rows.length > 0 737 setEnabled(rows.length > 0 742 738 && rows[rows.length -1] != mergedEntriesTable.getRowCount() -1 743 739 ); … … 771 767 public void valueChanged(ListSelectionEvent e) { 772 768 int[] rows = mergedEntriesTable.getSelectedRows(); 773 setEnabled( 774 rows != null 775 && rows.length > 0 776 ); 769 setEnabled(rows.length > 0); 777 770 } 778 771 }
Note:
See TracChangeset
for help on using the changeset viewer.