Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8254586: Replace fthrow() calls with simpler method calls in classFil…
…eParser.cpp

Reviewed-by: lfoltan, dholmes, coleenp
  • Loading branch information
Harold Seigel committed Oct 14, 2020
1 parent ba140b0 commit 95e68c6
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 127 deletions.
21 changes: 20 additions & 1 deletion src/hotspot/share/classfile/classFileError.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2020, 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
Expand Down Expand Up @@ -78,6 +78,25 @@ void ClassFileParser::classfile_parse_error(const char* msg,
msg, name, signature, _class_name->as_C_string());
}

void ClassFileParser::classfile_icce_error(const char* msg,
const Klass* k,
TRAPS) const {
assert(_class_name != NULL, "invariant");
ResourceMark rm(THREAD);
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_IncompatibleClassChangeError(),
msg, _class_name->as_klass_external_name(), k->external_name());
}

void ClassFileParser::classfile_ucve_error(const char* msg,
const Symbol* class_name,
u2 major,
u2 minor,
TRAPS) const {
ResourceMark rm(THREAD);
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_UnsupportedClassVersionError(),
msg, class_name->as_C_string(), major, minor);
}

PRAGMA_DIAG_POP

void StackMapStream::stackmap_format_error(const char* msg, TRAPS) {
Expand Down

1 comment on commit 95e68c6

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 95e68c6 Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.