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

Karl Helgason kalli at midverk.is
Thu Apr 10 15:29:39 UTC 2014


Yes, I knew about this fallthrough, altough not very nice, it is ok in
this case.

It probably would have been better to put this switch case into to
seperate if statement above it.

regards,
Kar



On 10.4.2014 03:00, "Joe Darcy" <joe.darcy at oracle.com> wrote:

>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