[Android] Don't use == to compare strings

Jean-Baptiste Kempf git at videolan.org
Sat Apr 12 10:05:15 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Apr 12 10:04:47 2014 +0200| [e5584c21c3e824fbf42a15f2b3d5d0d730229b02] | committer: Jean-Baptiste Kempf

Don't use == to compare strings

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e5584c21c3e824fbf42a15f2b3d5d0d730229b02
---

 vlc-android/src/org/videolan/libvlc/Media.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/libvlc/Media.java b/vlc-android/src/org/videolan/libvlc/Media.java
index edb9e66..39ed9fd 100644
--- a/vlc-android/src/org/videolan/libvlc/Media.java
+++ b/vlc-android/src/org/videolan/libvlc/Media.java
@@ -373,7 +373,7 @@ public class Media implements Comparable<Media> {
     }
 
     public String getGenre() {
-        if(mGenre == getValueWrapper(null, UnknownStringType.Genre))
+        if(getValueWrapper(null, UnknownStringType.Genre).equals(mGenre))
             return mGenre;
         else if( mGenre.length() > 1)/* Make genres case insensitive via normalisation */
             return Character.toUpperCase(mGenre.charAt(0)) + mGenre.substring(1).toLowerCase(Locale.getDefault());



More information about the Android mailing list