From 392333806a4d762c17172ba94db047e18fe6db51 Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Tue, 24 Mar 2020 09:26:36 +0300 Subject: [PATCH] image, GifSupport and SvgSupport Class.forName --- CHANGELOG.md | 1 + .../src/main/java/io/noties/markwon/image/gif/GifSupport.java | 3 ++- .../src/main/java/io/noties/markwon/image/svg/SvgSupport.java | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa38599f..5c0f5148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ # 4.3.1-SNAPSHOT * Fix DexGuard optimization issue ([#216])
Thanks [@francescocervone] +* module `images`: `GifSupport` and `SvgSupport` use `Class.forName` instead access to full qualified class name [#216]: https://github.com/noties/Markwon/pull/216 [@francescocervone]: https://github.com/francescocervone diff --git a/markwon-image/src/main/java/io/noties/markwon/image/gif/GifSupport.java b/markwon-image/src/main/java/io/noties/markwon/image/gif/GifSupport.java index 70a143fc..b5c68d44 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/gif/GifSupport.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/gif/GifSupport.java @@ -14,7 +14,8 @@ public abstract class GifSupport { static { boolean result; try { - pl.droidsonroids.gif.GifDrawable.class.getName(); + // @since $nap; + Class.forName("pl.droidsonroids.gif.GifDrawable"); result = true; } catch (Throwable t) { // @since 4.1.1 instead of printing full stacktrace of the exception, diff --git a/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgSupport.java b/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgSupport.java index 4afe2506..aea6ffb5 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgSupport.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgSupport.java @@ -14,7 +14,7 @@ public abstract class SvgSupport { static { boolean result; try { - com.caverock.androidsvg.SVG.class.getName(); + Class.forName("com.caverock.androidsvg.SVG"); result = true; } catch (Throwable t) { // @since 4.1.1 instead of printing full stacktrace of the exception,