Skip to content

Commit

Permalink
8296262: Remove dead code from InstanceKlass::signature_name()
Browse files Browse the repository at this point in the history
Reviewed-by: iklam
  • Loading branch information
David Holmes committed Nov 3, 2022
1 parent fd60036 commit 13b20e0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/hotspot/share/oops/instanceKlass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
Expand Down

1 comment on commit 13b20e0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.