Changeset 14105 in josm for trunk/src/org


Ignore:
Timestamp:
2018-08-07T20:26:10+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16576 - catch UnsatisfiedLinkError

File:
1 edited

Legend:

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

    r13991 r14105  
    978978                try {
    979979                    img = read(Utils.fileToURL(cf.getFile()), false, false);
    980                 } catch (IOException e) {
    981                     Logging.log(Logging.LEVEL_WARN, "IOException while reading HTTP image:", e);
     980                } catch (IOException | UnsatisfiedLinkError e) {
     981                    Logging.log(Logging.LEVEL_WARN, "Exception while reading HTTP image:", e);
    982982                }
    983983                return img == null ? null : new ImageResource(img);
     
    10351035                    Image img = read(new ByteArrayInputStream(bytes), false, true);
    10361036                    return img == null ? null : new ImageResource(img);
    1037                 } catch (IOException e) {
    1038                     Logging.log(Logging.LEVEL_WARN, "IOException while reading image:", e);
     1037                } catch (IOException | UnsatisfiedLinkError e) {
     1038                    Logging.log(Logging.LEVEL_WARN, "Exception while reading image:", e);
    10391039                }
    10401040            }
     
    11201120                        try {
    11211121                            img = read(new ByteArrayInputStream(buf), false, false);
    1122                         } catch (IOException e) {
     1122                        } catch (IOException | UnsatisfiedLinkError e) {
    11231123                            Logging.warn(e);
    11241124                        }
     
    11291129                }
    11301130            }
    1131         } catch (IOException e) {
     1131        } catch (IOException | UnsatisfiedLinkError e) {
    11321132            Logging.log(Logging.LEVEL_WARN, tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString()), e);
    11331133        }
     
    11651165                    Logging.debug("Transparency has been forced for image {0}", path);
    11661166                }
    1167             } catch (IOException e) {
     1167            } catch (IOException | UnsatisfiedLinkError e) {
    11681168                Logging.log(Logging.LEVEL_WARN, "Unable to read image", e);
    11691169                Logging.debug(e);
Note: See TracChangeset for help on using the changeset viewer.