Changeset 30436 in osm for applications/editors/josm/plugins/piclayer/src/org
- Timestamp:
- 2014-05-09T05:21:14+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
r29531 r30436 56 56 import org.openstreetmap.josm.plugins.piclayer.actions.SavePictureCalibrationAction; 57 57 import org.openstreetmap.josm.plugins.piclayer.transform.PictureTransform; 58 import org.openstreetmap.josm.tools.Utils;59 58 60 59 /** … … 457 456 458 457 public void loadWorldfile(InputStream is) throws IOException { 459 BufferedReader br = null;460 try {458 459 try ( 461 460 Reader reader = new InputStreamReader(is); 462 br = new BufferedReader(reader); 461 BufferedReader br = new BufferedReader(reader) 462 ) { 463 463 double e[] = new double[6]; 464 464 for (int i=0; i<6; ++i) { … … 488 488 initialImageScale = 1; 489 489 Main.map.mapView.repaint(); 490 } finally {491 Utils.close(br);492 490 } 493 491 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java
r27120 r30436 23 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 24 25 import org.openstreetmap.josm.Main;26 27 25 import java.awt.Image; 28 26 import java.io.File; … … 38 36 import javax.swing.JOptionPane; 39 37 40 import org.openstreetmap.josm. tools.Utils;38 import org.openstreetmap.josm.Main; 41 39 /** 42 40 * Layer displaying a picture loaded from a file. … … 96 94 if (imgEntry != null) { 97 95 imgNameInZip = imgEntry.getName(); 98 InputStream is = null; 99 try { 100 is = zipFile.getInputStream(imgEntry); 101 image = ImageIO.read(is); 102 return image; 103 } finally { 104 Utils.close(is); 96 try (InputStream is = zipFile.getInputStream(imgEntry)) { 97 return ImageIO.read(is); 105 98 } 106 99 }
Note:
See TracChangeset
for help on using the changeset viewer.