8296262: Remove dead code from InstanceKlass::signature_name()

Reviewed-by: iklam
This commit is contained in:
David Holmes 2022-11-03 02:27:30 +00:00
parent fd60036a34
commit 13b20e0e6d

View file

@ -2733,14 +2733,12 @@ void InstanceKlass::set_source_debug_extension(const char* array, int length) {
}
const char* InstanceKlass::signature_name() const {
int hash_len = 0;
char hash_buf[40];
// Get the internal name as a c string
const char* src = (const char*) (name()->as_C_string());
const int src_length = (int)strlen(src);
char* dest = NEW_RESOURCE_ARRAY(char, src_length + hash_len + 3);
char* dest = NEW_RESOURCE_ARRAY(char, src_length + 3);
// Add L as type indicator
int dest_index = 0;
@ -2760,11 +2758,6 @@ const char* InstanceKlass::signature_name() const {
}
}
// If we have a hash, append it
for (int hash_index = 0; hash_index < hash_len; ) {
dest[dest_index++] = hash_buf[hash_index++];
}
// Add the semicolon and the NULL
dest[dest_index++] = JVM_SIGNATURE_ENDCLASS;
dest[dest_index] = '\0';