[libbluray-devel] Cosmetics

hpi1 git at videolan.org
Sun Sep 16 20:57:18 CEST 2012


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Sep 15 22:19:29 2012 +0300| [48345b1e1d0f909d9dad9275a5c7d75f41948a98] | committer: hpi1

Cosmetics

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

 .../bdj/java/org/dvb/io/ixc/IxcRegistry.java       |   65 ++++++++---------
 .../bdj/java/org/videolan/bdjo/AppEntry.java       |   76 ++++++++------------
 .../java/org/videolan/bdjo/GraphicsResolution.java |   34 ++++-----
 3 files changed, 72 insertions(+), 103 deletions(-)

diff --git a/src/libbluray/bdj/java/org/dvb/io/ixc/IxcRegistry.java b/src/libbluray/bdj/java/org/dvb/io/ixc/IxcRegistry.java
index 5797949..8f21037 100644
--- a/src/libbluray/bdj/java/org/dvb/io/ixc/IxcRegistry.java
+++ b/src/libbluray/bdj/java/org/dvb/io/ixc/IxcRegistry.java
@@ -34,80 +34,73 @@ import org.videolan.BasicXletContext;
 import org.videolan.XletState;
 
 public class IxcRegistry {
-    public static Remote lookup(XletContext xc, String path)
-            throws NotBoundException, RemoteException
-    {
+    public static Remote lookup(XletContext xc, String path) throws NotBoundException, RemoteException {
         String[] parts = path.split("/", 3);
-        
+
         if (parts.length != 3)
             throw new IllegalArgumentException("Malformed path");
-        
+
         int orgId = Integer.parseInt(parts[0], 16);
         short appId = Short.parseShort(parts[1], 16);
         String name = parts[2];
-        
+
         for (IxcObject obj : ixcList) {
             if (obj.orgId == orgId && obj.appId == appId && obj.name.equals(name)) {
                 logger.info("Looked up " + path);
                 return obj.obj;
             }
         }
-        
+
         logger.warning("Failed to look up " + path);
         throw new NotBoundException();
     }
 
-    public static void bind(XletContext xc, String name, Remote obj)
-            throws AlreadyBoundException
-    {   
+    public static void bind(XletContext xc, String name, Remote obj) throws AlreadyBoundException {
         if (xc == null || name == null || obj == null)
             throw new NullPointerException();
-        
+
         // make sure the xlet is not currently in the destroyed state
         if (((BasicXletContext)xc).getState().equals(XletState.DESTROYED))
             return;
-        
+
         int orgId = (Integer)xc.getXletProperty("dvb.org.id");
         short appId = (Short)xc.getXletProperty("dvb.app.id");
-        
+
         IxcObject ixcObj = new IxcObject(orgId, appId, name, obj);
-        
+
         if (ixcList.contains(ixcObj))
             throw new AlreadyBoundException();
-        
+
         ixcList.add(ixcObj);
-        
+
         logger.info("Bound /" + Integer.toString(orgId, 16) + "/" + Integer.toString(appId, 16) + "/" + name);
     }
 
-    public static void unbind(XletContext xc, String name)
-            throws NotBoundException
-    {
+    public static void unbind(XletContext xc, String name) throws NotBoundException {
         if (xc == null || name == null)
             throw new NullPointerException();
-        
+
         int orgId = (Integer)xc.getXletProperty("dvb.org.id");
         short appId = (Short)xc.getXletProperty("dvb.app.id");
-        
+
         IxcObject ixcObj = new IxcObject(orgId, appId, name, null);
-        
+
         if (!ixcList.contains(ixcObj))
             throw new NotBoundException();
-        
+
         ixcList.remove(ixcObj);
-        
+
         logger.info("Unbound /" + Integer.toString(orgId, 16) + "/" + Integer.toString(appId, 16) + "/" + name);
     }
 
-    public static void rebind(XletContext xc, String name, Remote obj)
-    {
-        
+    public static void rebind(XletContext xc, String name, Remote obj) {
+
         try {
             unbind(xc, name);
         } catch (NotBoundException e) {
             // ignore
         }
-        
+
         try {
             bind(xc, name, obj);
         } catch (AlreadyBoundException e) {
@@ -116,19 +109,18 @@ public class IxcRegistry {
         }
     }
 
-    public static String[] list(XletContext xc)
-    {
+    public static String[] list(XletContext xc) {
         String[] out = new String[ixcList.size()];
-        
+
         for (int i = 0; i < ixcList.size(); i++) {
             IxcObject obj = ixcList.get(i);
-            
+
             out[i] = "/" + Integer.toString(obj.orgId, 16) + "/" + Integer.toString(obj.appId, 16) + "/" + obj.name;
         }
-        
+
         return out;
     }
-    
+
     private static class IxcObject {
         public IxcObject(int orgId, short appId, String name, Remote obj) {
             this.orgId = orgId;
@@ -137,8 +129,7 @@ public class IxcRegistry {
             this.obj = obj;
         }
 
-        public boolean equals(Object obj)
-        {
+        public boolean equals(Object obj) {
             if (this == obj)
                 return true;
             if (obj == null)
@@ -163,7 +154,7 @@ public class IxcRegistry {
         public String name;
         public Remote obj;
     }
-    
+
     private static List<IxcObject> ixcList = Collections.synchronizedList(new ArrayList<IxcObject>());
     private static Logger logger = Logger.getLogger(IxcRegistry.class.getName());
 }
diff --git a/src/libbluray/bdj/java/org/videolan/bdjo/AppEntry.java b/src/libbluray/bdj/java/org/videolan/bdjo/AppEntry.java
index 768147a..699eb89 100644
--- a/src/libbluray/bdj/java/org/videolan/bdjo/AppEntry.java
+++ b/src/libbluray/bdj/java/org/videolan/bdjo/AppEntry.java
@@ -29,83 +29,67 @@ public class AppEntry {
         this.params = params;
     }
 
-    public ControlCode getControlCode()
-    {
+    public ControlCode getControlCode() {
         return controlCode;
     }
-    
-    public AppType getType()
-    {
+
+    public AppType getType() {
         return type;
     }
-    
-    public int getOrgId()
-    {
+
+    public int getOrgId() {
         return orgId;
     }
-    
-    public short getAppId()
-    {
+
+    public short getAppId() {
         return appId;
     }
-    
-    public AppProfile[] getProfiles()
-    {
+
+    public AppProfile[] getProfiles() {
         return profiles;
     }
-    
-    public short getPriority()
-    {
+
+    public short getPriority() {
         return priority;
     }
-    
-    public AppBinding getBinding()
-    {
+
+    public AppBinding getBinding() {
         return binding;
     }
-    
-    public AppVisibility getVisibility()
-    {
+
+    public AppVisibility getVisibility() {
         return visibility;
     }
-    
-    public AppName[] getNames()
-    {
+
+    public AppName[] getNames() {
         return names;
     }
-    
-    public Locator getIconLocator()
-    {
+
+    public Locator getIconLocator() {
         return iconLocator;
     }
-    
-    public short getIconFlags()
-    {
+
+    public short getIconFlags() {
         return iconFlags;
     }
-    
-    public String getBasePath()
-    {
+
+    public String getBasePath() {
         return basePath;
     }
-    
-    public String getClasspathExt()
-    {
+
+    public String getClasspathExt() {
         return classpathExt;
     }
-    
-    public String getInitialClass()
-    {
+
+    public String getInitialClass() {
         return initialClass;
     }
-    
-    public String[] getParams()
-    {
+
+    public String[] getParams() {
         return params;
     }
 
-    public String toString()
-    {
+    public String toString() {
         return "AppEntry [appId=" + appId + ", basePath=" + basePath
                 + ", binding=" + binding + ", classpathExt=" + classpathExt
                 + ", controlCode=" + controlCode + ", iconFlags=" + iconFlags
diff --git a/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java b/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java
index 402d485..823a331 100644
--- a/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java
+++ b/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java
@@ -11,44 +11,38 @@ public enum GraphicsResolution
     SD_50HZ_720_576(4, 720, 576),
     SD_60HZ_720_480(5, 720, 480),
     QHD_960_540(6, 960, 540);
-    
-    GraphicsResolution(int id, int width, int height)
-    {
+
+    GraphicsResolution(int id, int width, int height) {
         this.id = id;
         this.width = width;
         this.height = height;
     }
-    
-    public int getId()
-    {
+
+    public int getId() {
         return id;
     }
-    
-    public int getWidth()
-    {
+
+    public int getWidth() {
         return width;
     }
-    
-    public int getHeight()
-    {
+
+    public int getHeight() {
         return height;
     }
-    
-    public static GraphicsResolution fromId(int id)
-    {
-        for (GraphicsResolution res : values())
-        {
+
+    public static GraphicsResolution fromId(int id) {
+        for (GraphicsResolution res : values()) {
             if (res.getId() == id)
                 return res;
         }
-        
+
         logger.log(Level.WARNING, "Invalid graphics resolution id: " + id);
         return null;
     }
-    
+
     private int id;
     private int width;
     private int height;
-    
+
     private static final Logger logger = Logger.getLogger(GraphicsResolution.class.getName());
 }



More information about the libbluray-devel mailing list