Skip to content

Commit 13f3e1f

Browse files
andy-goryachev-oraclenlisker
authored andcommitted
8289395: Fix warnings: Varargs methods should only override or be overridden by other varargs methods
Reviewed-by: nlisker
1 parent c7d3fd9 commit 13f3e1f

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

modules/javafx.base/src/main/java/com/sun/javafx/collections/ObservableFloatArrayImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -152,7 +152,7 @@ public void setAll(float[] src, int srcIndex, int length) {
152152
}
153153

154154
@Override
155-
public void setAll(float[] src) {
155+
public void setAll(float... src) {
156156
setAllInternal(src, 0, src.length);
157157
}
158158

modules/javafx.base/src/main/java/com/sun/javafx/collections/ObservableIntegerArrayImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -152,7 +152,7 @@ public void setAll(int[] src, int srcIndex, int length) {
152152
}
153153

154154
@Override
155-
public void setAll(int[] src) {
155+
public void setAll(int... src) {
156156
setAllInternal(src, 0, src.length);
157157
}
158158

modules/javafx.base/src/test/java/test/javafx/collections/SourceAdapterChangeTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,7 @@ public interface ListFactory<E> {
5656
items -> new VetoableListDecorator<Person>(items) {
5757

5858
@Override
59-
protected void onProposedChange(List<Person> added, int[] removed) {
59+
protected void onProposedChange(List<Person> added, int... removed) {
6060
}
6161
};
6262

modules/javafx.base/src/test/java/test/javafx/collections/TestedObservableLists.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@ public interface TestedObservableLists {
4343
Callable<ObservableList<String>> VETOABLE_LIST = () -> new VetoableListDecorator<String>(FXCollections.<String>observableArrayList()) {
4444

4545
@Override
46-
protected void onProposedChange(List list, int[] idx) { }
46+
protected void onProposedChange(List list, int... idx) { }
4747
};
4848

4949
Callable<ObservableList<String>> CHECKED_OBSERVABLE_ARRAY_LIST = () -> FXCollections.checkedObservableList(FXCollections.observableList(new ArrayList()), String.class);

modules/javafx.base/src/test/java/test/javafx/collections/VetoableObservableListTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -80,7 +80,7 @@ public void setUp() {
8080
list = new VetoableListDecorator<String>(FXCollections.<String>observableArrayList()) {
8181

8282
@Override
83-
protected void onProposedChange(List<String> added, int[] removed) {
83+
protected void onProposedChange(List<String> added, int... removed) {
8484
calls.add(new Call(added, removed));
8585
}
8686
};

modules/javafx.graphics/src/main/java/javafx/scene/Parent.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -466,7 +466,7 @@ protected void onChanged(Change<Node> c) {
466466

467467
}) {
468468
@Override
469-
protected void onProposedChange(final List<Node> newNodes, int[] toBeRemoved) {
469+
protected void onProposedChange(final List<Node> newNodes, int... toBeRemoved) {
470470
final Scene scene = getScene();
471471
if (scene != null) {
472472
Window w = scene.getWindow();

modules/javafx.graphics/src/main/java/javafx/stage/Stage.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -697,7 +697,7 @@ private ReadOnlyBooleanWrapper fullScreenPropertyImpl () {
697697
}
698698
}) {
699699
@Override protected void onProposedChange(
700-
final List<Image> toBeAddedIcons, int[] indices) {
700+
final List<Image> toBeAddedIcons, int... indices) {
701701
for (Image icon : toBeAddedIcons) {
702702
if (icon == null) {
703703
throw new NullPointerException("icon can not be null.");

modules/javafx.media/src/main/java/javafx/scene/media/AudioEqualizer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@ public Bands() {
208208
}
209209

210210
@Override
211-
protected void onProposedChange(List<EqualizerBand> toBeAdded, int[] toBeRemoved) {
211+
protected void onProposedChange(List<EqualizerBand> toBeAdded, int... toBeRemoved) {
212212
synchronized (disposeLock) {
213213
if (jfxEqualizer != null) {
214214
for (int i = 0; i < toBeRemoved.length; i += 2) {

0 commit comments

Comments
 (0)