src/share/classes/javax/sound/midi/Sequence.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -282,11 +282,11 @@
      * @see #createTrack
      * @see #deleteTrack
      */
     public Track[] getTracks() {
 
-        return (Track[]) tracks.toArray(new Track[tracks.size()]);
+        return tracks.toArray(new Track[tracks.size()]);
     }
 
 
     /**
      * Obtains the duration of this sequence, expressed in microseconds.

@@ -310,11 +310,11 @@
         long length = 0;
 
         synchronized(tracks) {
 
             for(int i=0; i<tracks.size(); i++ ) {
-                long temp = ((Track)tracks.elementAt(i)).ticks();
+                long temp = tracks.elementAt(i).ticks();
                 if( temp>length ) {
                     length = temp;
                 }
             }
             return length;