Hello,
In the course of fixing
JDK-8043550: Fix raw and unchecked lint warnings in javax.swing.*
http://cr.openjdk.java.net/~darcy/8043550.1/
I encountered a build failure in jconsole due to a conflict between a
recent generification in jconsole
8044865: Fix raw and unchecked lint warnings in management-related code
http://hg.openjdk.java.net/jdk9/dev/jdk/rev/81e22723ba57
and the newly generified swing. Fortunately, the adjustment in jconsole
to be reviewed is simple:
--- a/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java
Tue Jul 01 23:09:52 2014 +0000
+++ b/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java
Thu Jul 03 12:09:44 2014 -0700
@@ -217,17 +217,17 @@
}
}
- private Vector<?> getRow(int row) {
- return (Vector) dataVector.elementAt(row);
+ private Vector<Object> getRow(int row) {
+ return dataVector.elementAt(row);
}
@SuppressWarnings("unchecked")
- private void setRow(Vector<?> data, int row) {
+ private void setRow(Vector<Object> data, int row) {
dataVector.setElementAt(data,row);
}
private void swap(int i, int j, int column) {
- Vector<?> data = getRow(i);
+ Vector<Object> data = getRow(i);
setRow(getRow(j),i);
setRow(data,j);
The protected dataVector field is now declared to be a
Vector<Vector<Object>> so the more precise type can be used in these
private methods.
Thanks,
-Joe