From 9a37b48dd87660774449260d75c5cf2e2578af95 Mon Sep 17 00:00:00 2001 From: smallsql Date: Sat, 10 Mar 2012 11:52:49 +0000 Subject: Fix a deadlock for TooltipImages which complete with a ImageObserver.FRAMEBITS instead with ImageObserver.ALLBITS. The problem occur with JDownloader. --- openjdk/sun/awt/image/ImageRepresentation.java | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'openjdk/sun') diff --git a/openjdk/sun/awt/image/ImageRepresentation.java b/openjdk/sun/awt/image/ImageRepresentation.java index 92771953..962d46e0 100644 --- a/openjdk/sun/awt/image/ImageRepresentation.java +++ b/openjdk/sun/awt/image/ImageRepresentation.java @@ -30,11 +30,8 @@ import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.ImageConsumer; import java.awt.image.ImageObserver; -import java.util.Arrays; import java.util.Hashtable; -import com.sun.jdi.InvalidStackFrameException; - import cli.System.Drawing.Bitmap; import cli.System.Drawing.Imaging.BitmapData; import cli.System.Drawing.Imaging.ImageLockMode; @@ -328,10 +325,9 @@ public class ImageRepresentation extends ImageWatched implements ImageConsumer{ if (done) { image.getSource().removeConsumer(this); consuming = false; - - if (bimage == null) { - bimage = new BufferedImage(getBitmapRef()); - } + } + if (bimage == null ) { + bimage = new BufferedImage(getBitmapRef()); } availinfo |= info; notifyAll(); @@ -422,15 +418,4 @@ public class ImageRepresentation extends ImageWatched implements ImageConsumer{ | ImageObserver.FRAMEBITS | ImageObserver.ALLBITS); } - - /** - * Get the .NET Bitmap object. - */ - @cli.IKVM.Attributes.HideFromJavaAttribute.Annotation - public cli.System.Drawing.Bitmap getBitmap(){ - if( bitmap == null ){ - throw new IllegalStateException("Image not complete."); - } - return bitmap; - } } -- cgit v1.2.3