< prev index next >
src/hotspot/share/runtime/signature.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 416,437 ****
}
}
return args_count;
}
! bool SignatureVerifier::is_valid_signature(Symbol* sig) {
! const char* signature = (const char*)sig->bytes();
! ssize_t len = sig->utf8_length();
! if (signature == NULL || signature[0] == '\0' || len < 1) {
! return false;
! } else if (signature[0] == '(') {
! return is_valid_method_signature(sig);
! } else {
! return is_valid_type_signature(sig);
! }
! }
!
bool SignatureVerifier::is_valid_method_signature(Symbol* sig) {
const char* method_sig = (const char*)sig->bytes();
ssize_t len = sig->utf8_length();
ssize_t index = 0;
if (method_sig != NULL && len > 1 && method_sig[index] == '(') {
--- 416,426 ----
}
}
return args_count;
}
! #ifdef ASSERT
bool SignatureVerifier::is_valid_method_signature(Symbol* sig) {
const char* method_sig = (const char*)sig->bytes();
ssize_t len = sig->utf8_length();
ssize_t index = 0;
if (method_sig != NULL && len > 1 && method_sig[index] == '(') {
*** 497,501 ****
--- 486,491 ----
return true;
default:
return false;
}
}
+ #endif // ASSERT
< prev index next >