[libbluray-devel] Return copy of array

hpi1 git at videolan.org
Thu Jun 4 14:39:36 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Jun  4 15:02:54 2015 +0300| [eea3d1383acbb017f4ae4f7318d9e27a1f41735c] | committer: hpi1

Return copy of array

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

 .../javax/tv/service/selection/ServiceContextFactoryImpl.java     |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/javax/tv/service/selection/ServiceContextFactoryImpl.java b/src/libbluray/bdj/java/javax/tv/service/selection/ServiceContextFactoryImpl.java
index a360770..2940db4 100644
--- a/src/libbluray/bdj/java/javax/tv/service/selection/ServiceContextFactoryImpl.java
+++ b/src/libbluray/bdj/java/javax/tv/service/selection/ServiceContextFactoryImpl.java
@@ -66,7 +66,10 @@ public class ServiceContextFactoryImpl extends ServiceContextFactory {
             SecurityManager sec = System.getSecurityManager();
             if (sec != null)
                 sec.checkPermission(new ServiceContextPermission("access", "own"));
-            return serviceContexts;
+
+            ServiceContext[] r = new ServiceContext[1];
+            r[0] = serviceContexts[0];
+            return r;
 
         } catch (Exception e) {
         }



More information about the libbluray-devel mailing list