Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/java_bytecode/ci_lazy_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,13 @@ void ci_lazy_methodst::initialize_needed_classes(
lazy_methods.add_needed_class("java::java.lang.String");
lazy_methods.add_needed_class("java::java.lang.Class");
lazy_methods.add_needed_class("java::java.lang.Object");
// Add the classes that can be produced by `java_bytecode_instrument`:
lazy_methods.add_needed_class("java::java.lang.NullPointerException");
lazy_methods.add_needed_class("java::java.lang.ArithmeticException");
lazy_methods.add_needed_class(
"java::java.lang.ArrayIndexOutOfBoundsException");
lazy_methods.add_needed_class("java::java.lang.ClassCastException");
lazy_methods.add_needed_class("java::java.lang.NegativeArraySizeException");
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a comment to java_bytecode_instrument::instrument_expr to say that new runtime thrown exceptions need to be added to ci_lazy_methods.cpp

}

/// Build up list of methods for types for a pointer and any types it
Expand Down