<Sound Dev> JDK 9 RFR of JDK-8039863: Fix fallthrough lint warnings in sound

Joe Darcy joe.darcy at oracle.com
Thu Apr 10 03:00:45 UTC 2014


Hello,

Please review a fix for

     JDK-8039863: Fix fallthrough lint warnings in sound
     http://cr.openjdk.java.net/~darcy/8039863.0/

Without having domain knowledge of this code, it wasn't clear to me 
whether or not the fall through was intended.

Thanks,

-Joe

--- old/src/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java 
2014-04-09 19:57:58.000000000 -0700
+++ new/src/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java 
2014-04-09 19:57:58.000000000 -0700
@@ -118,6 +118,7 @@
          return null;
      }

+    @SuppressWarnings("fallthrough")
      public void processControlLogic() {
          for (int i = 0; i < used_count; i++) {

@@ -170,6 +171,7 @@
                          this.delay[i][0] / 1200.0) / control_time);
                  if (stage_ix[i] < 0)
                      stage_ix[i] = 0;
+                // Fallthrough okay?
              case EG_DELAY:
                  if (stage_ix[i] == 0) {
                      double attack = this.attack[i][0];



More information about the sound-dev mailing list