1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
273 "Illegal utf8 patch at %d in class file %s", |
273 "Illegal utf8 patch at %d in class file %s", |
274 index, CHECK); |
274 index, CHECK); |
275 char* str = java_lang_String::as_utf8_string(patch()); |
275 char* str = java_lang_String::as_utf8_string(patch()); |
276 // (could use java_lang_String::as_symbol instead, but might as well batch them) |
276 // (could use java_lang_String::as_symbol instead, but might as well batch them) |
277 utf8_buffer = (u1*) str; |
277 utf8_buffer = (u1*) str; |
278 utf8_length = (int) strlen(str); |
278 utf8_length = (u2) strlen(str); |
279 } |
279 } |
280 |
280 |
281 unsigned int hash; |
281 unsigned int hash; |
282 Symbol* result = SymbolTable::lookup_only((char*)utf8_buffer, utf8_length, hash); |
282 Symbol* result = SymbolTable::lookup_only((char*)utf8_buffer, utf8_length, hash); |
283 if (result == NULL) { |
283 if (result == NULL) { |