Changeset 12524 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2017-07-27T18:36:09+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15079, see #13973 - catch unexplainable "NoClassDefFoundError: Could not initialize class sun.awt.image.ShortInterleavedRaster"

File:
1 edited

Legend:

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

    r12508 r12524  
    17141714        ImageReadParam param = reader.getDefaultReadParam();
    17151715        reader.setInput(stream, true, !readMetadata && !enforceTransparency);
    1716         BufferedImage bi;
     1716        BufferedImage bi = null;
    17171717        try {
    17181718            bi = reader.read(0, param);
     
    17311731                }
    17321732            }
     1733        } catch (LinkageError e) {
     1734            // On Windows, ComponentColorModel.getRGBComponent can fail with "UnsatisfiedLinkError: no awt in java.library.path", see #13973
     1735            // Then it can leads to "NoClassDefFoundError: Could not initialize class sun.awt.image.ShortInterleavedRaster", see #15079
     1736            Main.error(e);
    17331737        } finally {
    17341738            reader.dispose();
     
    17911795            // JAI doesn't like some JPEG files with error "Inconsistent metadata read from stream" (see #10267)
    17921796            Main.warn(e);
    1793         } catch (UnsatisfiedLinkError e) {
    1794             // On Windows, ComponentColorModel.getRGBComponent can fail with "UnsatisfiedLinkError: no awt in java.library.path", see #13973
    1795             Main.error(e);
    17961797        }
    17971798        return null;
Note: See TracChangeset for help on using the changeset viewer.