From 63966eb93538f2695d7d369e52062ede48d08997 Mon Sep 17 00:00:00 2001 From: Vladimir Schneider Date: Thu, 23 Apr 2020 21:38:20 -0400 Subject: [PATCH] fix use of byte input stream --- .../main/java/com/vladsch/flexmark/util/misc/ImageUtils.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flexmark-util-misc/src/main/java/com/vladsch/flexmark/util/misc/ImageUtils.java b/flexmark-util-misc/src/main/java/com/vladsch/flexmark/util/misc/ImageUtils.java index 847fa25a3..7355f49e4 100644 --- a/flexmark-util-misc/src/main/java/com/vladsch/flexmark/util/misc/ImageUtils.java +++ b/flexmark-util-misc/src/main/java/com/vladsch/flexmark/util/misc/ImageUtils.java @@ -39,8 +39,6 @@ package com.vladsch.flexmark.util.misc; -import com.sun.xml.internal.messaging.saaj.util.ByteInputStream; - import javax.imageio.ImageIO; import java.awt.*; import java.awt.datatransfer.DataFlavor; @@ -175,7 +173,7 @@ public static BufferedImage loadImageFromContent(byte[] cachedImageBytes, String return null; } - ByteInputStream inputStream = new ByteInputStream(cachedImageBytes, cachedImageBytes.length); + ByteArrayInputStream inputStream = new ByteArrayInputStream(cachedImageBytes); try { return ImageIO.read(inputStream);