From 12108aa2fd216f090190362d114ab4f750f6fb24 Mon Sep 17 00:00:00 2001 From: Jeannie Moulton Date: Wed, 5 Feb 2020 13:59:59 +0000 Subject: [PATCH] Change class loading and parsing warnings to debug messages. Often, there are so many of these warnings that they lose all meaning as warning, so they are now moved to debug. --- .../java_bytecode_convert_class.cpp | 24 +++++++++---------- .../java_bytecode_convert_method.cpp | 22 ++++++++--------- jbmc/src/java_bytecode/java_class_loader.cpp | 16 ++++++------- 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/jbmc/src/java_bytecode/java_bytecode_convert_class.cpp b/jbmc/src/java_bytecode/java_bytecode_convert_class.cpp index cdda7322e35..ff32cdb1c20 100644 --- a/jbmc/src/java_bytecode/java_bytecode_convert_class.cpp +++ b/jbmc/src/java_bytecode/java_bytecode_convert_class.cpp @@ -302,10 +302,10 @@ void java_bytecode_convert_classt::convert( } catch(const unsupported_java_class_signature_exceptiont &e) { - warning() << "Class: " << c.name - << "\n could not parse signature: " << c.signature.value() - << "\n " << e.what() << "\n ignoring that the class is generic" - << eom; + debug() << "Class: " << c.name + << "\n could not parse signature: " << c.signature.value() + << "\n " << e.what() << "\n ignoring that the class is generic" + << eom; } } @@ -364,10 +364,10 @@ void java_bytecode_convert_classt::convert( } catch(const unsupported_java_class_signature_exceptiont &e) { - warning() << "Superclass: " << c.super_class << " of class: " << c.name - << "\n could not parse signature: " << superclass_ref.value() - << "\n " << e.what() - << "\n ignoring that the superclass is generic" << eom; + debug() << "Superclass: " << c.super_class << " of class: " << c.name + << "\n could not parse signature: " << superclass_ref.value() + << "\n " << e.what() + << "\n ignoring that the superclass is generic" << eom; class_type.add_base(base); } } @@ -404,10 +404,10 @@ void java_bytecode_convert_classt::convert( } catch(const unsupported_java_class_signature_exceptiont &e) { - warning() << "Interface: " << interface << " of class: " << c.name - << "\n could not parse signature: " << interface_ref.value() - << "\n " << e.what() - << "\n ignoring that the interface is generic" << eom; + debug() << "Interface: " << interface << " of class: " << c.name + << "\n could not parse signature: " << interface_ref.value() + << "\n " << e.what() + << "\n ignoring that the interface is generic" << eom; class_type.add_base(base); } } diff --git a/jbmc/src/java_bytecode/java_bytecode_convert_method.cpp b/jbmc/src/java_bytecode/java_bytecode_convert_method.cpp index 6db54c48305..fd22667eb84 100644 --- a/jbmc/src/java_bytecode/java_bytecode_convert_method.cpp +++ b/jbmc/src/java_bytecode/java_bytecode_convert_method.cpp @@ -275,21 +275,21 @@ java_method_typet member_type_lazy( } else { - message.warning() << "Method: " << class_name << "." << method_name - << "\n signature: " << signature.value() - << "\n descriptor: " << descriptor - << "\n different number of parameters, reverting to " - "descriptor" - << message.eom; + message.debug() << "Method: " << class_name << "." << method_name + << "\n signature: " << signature.value() + << "\n descriptor: " << descriptor + << "\n different number of parameters, reverting to " + "descriptor" + << message.eom; } } catch(const unsupported_java_class_signature_exceptiont &e) { - message.warning() << "Method: " << class_name << "." << method_name - << "\n could not parse signature: " << signature.value() - << "\n " << e.what() << "\n" - << " reverting to descriptor: " << descriptor - << message.eom; + message.debug() << "Method: " << class_name << "." << method_name + << "\n could not parse signature: " << signature.value() + << "\n " << e.what() << "\n" + << " reverting to descriptor: " << descriptor + << message.eom; } } return to_java_method_type(*member_type_from_descriptor); diff --git a/jbmc/src/java_bytecode/java_class_loader.cpp b/jbmc/src/java_bytecode/java_class_loader.cpp index 75eadf057ad..7752661237e 100644 --- a/jbmc/src/java_bytecode/java_class_loader.cpp +++ b/jbmc/src/java_bytecode/java_class_loader.cpp @@ -164,11 +164,10 @@ java_class_loadert::get_parse_tree( ++parse_tree_it; break; } - warning() - << "Skipping class " << class_name - << " marked with OverlayClassImplementation but found before" - " original definition" - << eom; + debug() << "Skipping class " << class_name + << " marked with OverlayClassImplementation but found before" + " original definition" + << eom; } auto unloaded_or_overlay_out_of_order_it = parse_tree_it; ++parse_tree_it; @@ -180,9 +179,8 @@ java_class_loadert::get_parse_tree( // Remove non-initial classes that aren't overlays if(!is_overlay_class(parse_tree_it->parsed_class)) { - warning() - << "Skipping duplicate definition of class " << class_name - << " not marked with OverlayClassImplementation" << eom; + debug() << "Skipping duplicate definition of class " << class_name + << " not marked with OverlayClassImplementation" << eom; auto duplicate_non_overlay_it = parse_tree_it; ++parse_tree_it; parse_trees.erase(duplicate_non_overlay_it); @@ -194,7 +192,7 @@ java_class_loadert::get_parse_tree( return parse_trees; // Not found or failed to load - warning() << "failed to load class " << class_name << eom; + debug() << "failed to load class " << class_name << eom; parse_trees.emplace_back(class_name); return parse_trees; }