src/share/vm/classfile/classFileParser.cpp

changeset 9351
bae7d3cdf6af
parent 8761
4c3cae5323bb
child 9448
73d689add964
child 9530
9fce84e6f51a
equal deleted inserted replaced
9350:aeacee5afc4d 9351:bae7d3cdf6af
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) {

mercurial