254 assert(error_msg == NULL, "Dont call here with error_msg already set");
255
256 if (!MethodMatcher::canonicalize(line, error_msg)) {
257 assert(error_msg != NULL, "Message must be set if parsing failed");
258 return;
259 }
260
261 skip_leading_spaces(line, &total_bytes_read);
262
263 if (2 == sscanf(line, "%255" RANGESLASH "%*[ ]" "%255" RANGE0 "%n", class_name, method_name, &bytes_read)) {
264 c_match = check_mode(class_name, error_msg);
265 m_match = check_mode(method_name, error_msg);
266
267 if ((strchr(class_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
268 (strchr(class_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
269 error_msg = "Chars '<' and '>' not allowed in class name";
270 return;
271 }
272 if ((strchr(method_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
273 (strchr(method_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
274 if ((strncmp("<init>", method_name, 255) != 0) && (strncmp("<clinit>", method_name, 255) != 0)) {
275 error_msg = "Chars '<' and '>' only allowed in <init> and <clinit>";
276 return;
277 }
278 }
279
280 if (c_match == MethodMatcher::Unknown || m_match == MethodMatcher::Unknown) {
281 assert(error_msg != NULL, "Must have been set by check_mode()");
282 return;
283 }
284
285 EXCEPTION_MARK;
286 Symbol* signature = NULL;
287 line += bytes_read;
288 bytes_read = 0;
289
290 skip_leading_spaces(line, &total_bytes_read);
291
292 // there might be a signature following the method.
293 // signatures always begin with ( so match that by hand
294 if (line[0] == '(') {
|
254 assert(error_msg == NULL, "Dont call here with error_msg already set");
255
256 if (!MethodMatcher::canonicalize(line, error_msg)) {
257 assert(error_msg != NULL, "Message must be set if parsing failed");
258 return;
259 }
260
261 skip_leading_spaces(line, &total_bytes_read);
262
263 if (2 == sscanf(line, "%255" RANGESLASH "%*[ ]" "%255" RANGE0 "%n", class_name, method_name, &bytes_read)) {
264 c_match = check_mode(class_name, error_msg);
265 m_match = check_mode(method_name, error_msg);
266
267 if ((strchr(class_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
268 (strchr(class_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
269 error_msg = "Chars '<' and '>' not allowed in class name";
270 return;
271 }
272 if ((strchr(method_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
273 (strchr(method_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
274 if (!vmSymbols::object_initializer_name()->equals(method_name) &&
275 !vmSymbols::class_initializer_name()->equals(method_name)) {
276 error_msg = "Chars '<' and '>' only allowed in <init> and <clinit>";
277 return;
278 }
279 }
280
281 if (c_match == MethodMatcher::Unknown || m_match == MethodMatcher::Unknown) {
282 assert(error_msg != NULL, "Must have been set by check_mode()");
283 return;
284 }
285
286 EXCEPTION_MARK;
287 Symbol* signature = NULL;
288 line += bytes_read;
289 bytes_read = 0;
290
291 skip_leading_spaces(line, &total_bytes_read);
292
293 // there might be a signature following the method.
294 // signatures always begin with ( so match that by hand
295 if (line[0] == '(') {
|