[vlma-devel] commit: Sanity check. (Adrien Grand )

git version control git at videolan.org
Sat Feb 14 21:38:06 CET 2009


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sat Feb 14 21:04:44 2009 +0100| [88b7b123dd79f3e5ae6f9e155cc732d212b6ed86] | committer: Adrien Grand 

Sanity check.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=88b7b123dd79f3e5ae6f9e155cc732d212b6ed86
---

 .../org/videolan/vlma/model/VirtualAdapter.java    |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/vlma-api/src/main/java/org/videolan/vlma/model/VirtualAdapter.java b/vlma-api/src/main/java/org/videolan/vlma/model/VirtualAdapter.java
index b8c0738..b19e026 100644
--- a/vlma-api/src/main/java/org/videolan/vlma/model/VirtualAdapter.java
+++ b/vlma-api/src/main/java/org/videolan/vlma/model/VirtualAdapter.java
@@ -36,9 +36,13 @@ public abstract class VirtualAdapter extends Adapter {
     public boolean isSuitableFor(Media media) {
         if (!canRead(media)) {
             return false;
-        } else {
+        } else if (media instanceof RemoteInputMedia) {
             RemoteInputMedia m = (RemoteInputMedia) media;
             return m.getServer() == null || m.getServer().equals(this.getServer());
+        } else {
+            // This block should never be executed
+            assert false;
+            return false;
         }
     }
 



More information about the vlma-devel mailing list