JDK 9 RFR of fallthrough fix in ASM
Joe Darcy
joe.darcy at oracle.com
Fri May 30 23:28:40 UTC 2014
Hello,
Please review this change to suppress a fall-through warning recently
sync'ed into ASM:
--- a/src/share/classes/jdk/internal/org/objectweb/asm/Item.java Fri May
30 13:37:35 2014 -0700
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/Item.java Fri May
30 16:19:12 2014 -0700
@@ -230,6 +230,7 @@
* @param strVal3
* third part of the value of this item.
*/
+ @SuppressWarnings("fallthrough")
void set(final int type, final String strVal1, final String strVal2,
final String strVal3) {
this.type = type;
The switch statement is
switch (type) {
case ClassWriter.CLASS:
this.intVal = 0; // intVal of a class must be zero, see
visitInnerClass
case ClassWriter.UTF8:
case ClassWriter.STR:
case ClassWriter.MTYPE:
case ClassWriter.TYPE_NORMAL:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
return;
case ClassWriter.NAME_TYPE: {
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
* strVal2.hashCode());
return;
}
// ClassWriter.FIELD:
// ClassWriter.METH:
// ClassWritehr.IMETH:
// ClassWriter.HANDLE_BASE + 1..9
default:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
* strVal2.hashCode() * strVal3.hashCode());
}
}
Thanks,
-Joe
More information about the core-libs-dev
mailing list