Follow up to JDK-8195100 from Kim Barrett:
src/hotspot/share/classfile/symbolTable.cpp
478 _created = SymbolTable::the_table()->allocate_symbol((const u1*)_name, _len, _heap, _thread);
[pre-existing] Why does the Symbol take a const u1* name argument?
Especially since that's not how it's used? It should probably be
const char*.
Agree, I prefer symbolTable APIs to consistently use ���const char *��� throughout and only cast to (const u1*) when using Symbol APIs.
To me it seems like a bug that the Symbol constructor uses u1 as the
element type of its name argument. I also wonder why it uses jbyte
rather than char as the element type of the body, but maybe there is
some underlying string that would be pulled by changing that. Doing
anything about this could be a followup cleanup RFE.