harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r833401 - /harmony/enhanced/classlib/trunk/modules/sound/src/main/java/javax/sound/sampled/AudioFormat.java
Date Fri, 06 Nov 2009 14:02:25 GMT
Author: tellison
Date: Fri Nov  6 14:02:24 2009
New Revision: 833401

URL: http://svn.apache.org/viewvc?rev=833401&view=rev
Log:
Tidy-up toString() to avoid drop through switch statement, and cleaner NLS compiler warning
avoidance.

Modified:
    harmony/enhanced/classlib/trunk/modules/sound/src/main/java/javax/sound/sampled/AudioFormat.java

Modified: harmony/enhanced/classlib/trunk/modules/sound/src/main/java/javax/sound/sampled/AudioFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sound/src/main/java/javax/sound/sampled/AudioFormat.java?rev=833401&r1=833400&r2=833401&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sound/src/main/java/javax/sound/sampled/AudioFormat.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/sound/src/main/java/javax/sound/sampled/AudioFormat.java
Fri Nov  6 14:02:24 2009
@@ -206,21 +206,25 @@
         
     }
 
+    @Override
+    @SuppressWarnings("nls")
     public String toString() {
 
         String ch;
         switch (channels) {
         case 1:
-            ch = "mono,"; //$NON-NLS-1$
+            ch = "mono,";
             break;
         case 2:
-            ch = "stereo,"; //$NON-NLS-1$
+            ch = "stereo,";
+            break;
         default:
-            ch = channels + " channels, "; //$NON-NLS-1$
-        }       
+            ch = channels + " channels, ";
+        }
 
-        return encoding + " " + sampleRate + " Hz, " + sampleSizeInBits + " bit, " //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
-            + ch + frameSize + " bytes/frame, " + frameRate + " frames/second"; //$NON-NLS-1$
//$NON-NLS-2$
+        return encoding + " " + sampleRate + " Hz, " + sampleSizeInBits
+                + " bit, " + ch + frameSize + " bytes/frame, " + frameRate
+                + " frames/second";
     }
     
 }



Mime
View raw message