[libbluray-devel] Cosmetics (sync J2ME and J2SE)

hpi1 git at videolan.org
Tue May 21 16:07:31 CEST 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue May 21 16:35:21 2013 +0300| [5b4436cccfa20a035ad13dd3406e07a30ed86c3b] | committer: hpi1

Cosmetics (sync J2ME and J2SE)

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5b4436cccfa20a035ad13dd3406e07a30ed86c3b
---

 src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java |   17 +++++++++++------
 src/libbluray/bdj/java-j2me/java/awt/BDToolkit.java  |    3 ++-
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java b/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
index 169474f..bbd1825 100644
--- a/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
+++ b/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
@@ -574,20 +574,25 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
         if ((sx < 0) || (sy < 0) ||
             (sw == 0) || (sh == 0) || (dw == 0) || (dh == 0))
             return false;
+
         BDImage bdImage;
-        if (img instanceof BDImage)
+        if (img instanceof BDImage) {
             bdImage = (BDImage)img;
-        else if (img instanceof DVBBufferedImage)
+        } else if (img instanceof DVBBufferedImage) {
             bdImage = (BDImage)getBufferedImagePeer(
-                    (BufferedImage)(((DVBBufferedImage)img).getImage()));
-        else if (img instanceof BufferedImage)
+                      (BufferedImage)(((DVBBufferedImage)img).getImage()));
+        } else if (img instanceof BufferedImage) {
             bdImage = (BDImage)getBufferedImagePeer((BufferedImage)img);
-        else
+        } else {
+            logger.unimplemented("drawImageN: unsupported image type " + img.getClass().getName());
             return false;
+        }
+
         if (bdImage instanceof BDImageConsumer) {
             BDImageConsumer consumer = (BDImageConsumer)bdImage;
-            if (!consumer.isComplete(observer))
+            if (!consumer.isComplete(observer)) {
                 return false;
+            }
         }
 
         if(sx + sw > bdImage.width) {
diff --git a/src/libbluray/bdj/java-j2me/java/awt/BDToolkit.java b/src/libbluray/bdj/java-j2me/java/awt/BDToolkit.java
index 6e97932..8f7835a 100644
--- a/src/libbluray/bdj/java-j2me/java/awt/BDToolkit.java
+++ b/src/libbluray/bdj/java-j2me/java/awt/BDToolkit.java
@@ -194,7 +194,8 @@ public class BDToolkit extends Toolkit {
         return img.checkImage(observer);
     }
 
-    public void beep() { }
+    public void beep() {
+    }
 
     // mapping of Components to AppContexts, WeakHashMap<Component,AppContext>
     private static final Map contextMap =



More information about the libbluray-devel mailing list