hotspot/src/share/vm/classfile/classFileError.cpp
changeset 24424 2658d7834c6e
parent 8921 14bfe81f2a9d
child 29201 fee2bbb2ec1d
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2014, 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.
    27 #include "classfile/stackMapTable.hpp"
    27 #include "classfile/stackMapTable.hpp"
    28 #include "classfile/verifier.hpp"
    28 #include "classfile/verifier.hpp"
    29 
    29 
    30 // Keep these in a separate file to prevent inlining
    30 // Keep these in a separate file to prevent inlining
    31 
    31 
       
    32 PRAGMA_DIAG_PUSH
       
    33 PRAGMA_FORMAT_NONLITERAL_IGNORED
       
    34 
    32 void ClassFileParser::classfile_parse_error(const char* msg, TRAPS) {
    35 void ClassFileParser::classfile_parse_error(const char* msg, TRAPS) {
    33     ResourceMark rm(THREAD);
    36     ResourceMark rm(THREAD);
    34     Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
    37     Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
    35                        msg, _class_name->as_C_string());
    38                        msg, _class_name->as_C_string());
    36 }
    39 }
    51     ResourceMark rm(THREAD);
    54     ResourceMark rm(THREAD);
    52     Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
    55     Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
    53                        msg, index, name, _class_name->as_C_string());
    56                        msg, index, name, _class_name->as_C_string());
    54 }
    57 }
    55 
    58 
       
    59 PRAGMA_DIAG_POP
       
    60 
    56 void StackMapStream::stackmap_format_error(const char* msg, TRAPS) {
    61 void StackMapStream::stackmap_format_error(const char* msg, TRAPS) {
    57   ResourceMark rm(THREAD);
    62   ResourceMark rm(THREAD);
    58   Exceptions::fthrow(
    63   Exceptions::fthrow(
    59     THREAD_AND_LOCATION,
    64     THREAD_AND_LOCATION,
    60     vmSymbols::java_lang_ClassFormatError(),
    65     vmSymbols::java_lang_ClassFormatError(),