Fix multiple Java warnings (#6201)

This commit is contained in:
Thad House
2024-01-12 08:46:21 -08:00
committed by GitHub
parent ba9c21cf38
commit 1981b8debd
15 changed files with 44 additions and 34 deletions

View File

@@ -53,7 +53,6 @@ public class CircularBuffer<T> {
* @throws IndexOutOfBoundsException if the index is out of range (index &lt; 0 || index &gt;=
* size())
*/
@SuppressWarnings("unchecked")
public T getLast() {
// If there are no elements in the buffer, do nothing
if (m_length == 0) {
@@ -111,7 +110,6 @@ public class CircularBuffer<T> {
* @throws IndexOutOfBoundsException if the index is out of range (index &lt; 0 || index &gt;=
* size())
*/
@SuppressWarnings("unchecked")
public T removeFirst() {
// If there are no elements in the buffer, do nothing
if (m_length == 0) {
@@ -131,7 +129,6 @@ public class CircularBuffer<T> {
* @throws IndexOutOfBoundsException if the index is out of range (index &lt; 0 || index &gt;=
* size())
*/
@SuppressWarnings("unchecked")
public T removeLast() {
// If there are no elements in the buffer, do nothing
if (m_length == 0) {