handle NoClassDefFoundError: Failed resolution of: Ljava/awt/Point; in metadata-extractor:2.14.0

This commit is contained in:
Thibault Deckers 2020-06-13 23:23:00 +09:00
parent e85c450557
commit 1ae633dede
3 changed files with 5 additions and 5 deletions

View file

@ -144,7 +144,7 @@ public class MetadataHandler implements MethodChannel.MethodCallHandler {
} }
} }
result.success(metadataMap); result.success(metadataMap);
} catch (ImageProcessingException e) { } catch (ImageProcessingException | NoClassDefFoundError e) {
getAllVideoMetadataFallback(call, result); getAllVideoMetadataFallback(call, result);
} catch (Exception e) { } catch (Exception e) {
result.error("getAllMetadata-exception", "failed to get metadata for uri=" + uri, e.getMessage()); result.error("getAllMetadata-exception", "failed to get metadata for uri=" + uri, e.getMessage());
@ -292,7 +292,7 @@ public class MetadataHandler implements MethodChannel.MethodCallHandler {
} }
} }
result.success(metadataMap); result.success(metadataMap);
} catch (Exception e) { } catch (Exception | NoClassDefFoundError e) {
result.error("getCatalogMetadata-exception", "failed to get metadata for uri=" + uri, e.getMessage()); result.error("getCatalogMetadata-exception", "failed to get metadata for uri=" + uri, e.getMessage());
} }
} }
@ -320,7 +320,7 @@ public class MetadataHandler implements MethodChannel.MethodCallHandler {
} }
} }
result.success(metadataMap); result.success(metadataMap);
} catch (Exception e) { } catch (Exception | NoClassDefFoundError e) {
result.error("getOverlayMetadata-exception", "failed to get metadata for uri=" + uri, e.getMessage()); result.error("getOverlayMetadata-exception", "failed to get metadata for uri=" + uri, e.getMessage());
} }
} }

View file

@ -237,7 +237,7 @@ public class ImageEntry {
} }
} }
} }
} catch (IOException | ImageProcessingException | MetadataException e) { } catch (IOException | ImageProcessingException | MetadataException | NoClassDefFoundError e) {
// ignore // ignore
} }
} }

View file

@ -146,7 +146,7 @@ public abstract class ImageProvider {
return fileTypeDir.getString(FileTypeDirectory.TAG_DETECTED_FILE_MIME_TYPE); return fileTypeDir.getString(FileTypeDirectory.TAG_DETECTED_FILE_MIME_TYPE);
} }
} }
} catch (IOException | ImageProcessingException e) { } catch (IOException | ImageProcessingException | NoClassDefFoundError e) {
Log.w(LOG_TAG, "failed to get mime type from metadata for uri=" + uri, e); Log.w(LOG_TAG, "failed to get mime type from metadata for uri=" + uri, e);
} }
return null; return null;