Changeset 16054 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-03-07T13:08:06+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r15906 r16054 155 155 */ 156 156 public ImageIcon getImageIcon(Dimension dim, boolean multiResolution) { 157 if(dim.width< -1|| dim.width ==0 ||dim.height< -1|| dim.height ==0)158 throw new IllegalArgumentException(dim+" is invalid");157 CheckParameterUtil.ensureThat((dim.width > 0 || dim.width == -1) && (dim.height > 0 || dim.height == -1), 158 () -> dim + " is invalid"); 159 159 BufferedImage img = imgCache.get(dim); 160 160 if (img == null) { … … 243 243 */ 244 244 public ImageIcon getImageIconBounded(Dimension maxSize, boolean multiResolution) { 245 if(maxSize.width< -1|| maxSize.width ==0 ||maxSize.height< -1|| maxSize.height ==0)246 throw new IllegalArgumentException(maxSize+" is invalid");245 CheckParameterUtil.ensureThat((maxSize.width > 0 || maxSize.width == -1) && (maxSize.height > 0 || maxSize.height == -1), 246 () -> maxSize + " is invalid"); 247 247 float sourceWidth; 248 248 float sourceHeight;
Note:
See TracChangeset
for help on using the changeset viewer.