Skip to content

Commit 12108aa

Browse files
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.
1 parent 6680696 commit 12108aa

File tree

3 files changed

+30
-32
lines changed

3 files changed

+30
-32
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_class.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ void java_bytecode_convert_classt::convert(
302302
}
303303
catch(const unsupported_java_class_signature_exceptiont &e)
304304
{
305-
warning() << "Class: " << c.name
306-
<< "\n could not parse signature: " << c.signature.value()
307-
<< "\n " << e.what() << "\n ignoring that the class is generic"
308-
<< eom;
305+
debug() << "Class: " << c.name
306+
<< "\n could not parse signature: " << c.signature.value()
307+
<< "\n " << e.what() << "\n ignoring that the class is generic"
308+
<< eom;
309309
}
310310
}
311311

@@ -364,10 +364,10 @@ void java_bytecode_convert_classt::convert(
364364
}
365365
catch(const unsupported_java_class_signature_exceptiont &e)
366366
{
367-
warning() << "Superclass: " << c.super_class << " of class: " << c.name
368-
<< "\n could not parse signature: " << superclass_ref.value()
369-
<< "\n " << e.what()
370-
<< "\n ignoring that the superclass is generic" << eom;
367+
debug() << "Superclass: " << c.super_class << " of class: " << c.name
368+
<< "\n could not parse signature: " << superclass_ref.value()
369+
<< "\n " << e.what()
370+
<< "\n ignoring that the superclass is generic" << eom;
371371
class_type.add_base(base);
372372
}
373373
}
@@ -404,10 +404,10 @@ void java_bytecode_convert_classt::convert(
404404
}
405405
catch(const unsupported_java_class_signature_exceptiont &e)
406406
{
407-
warning() << "Interface: " << interface << " of class: " << c.name
408-
<< "\n could not parse signature: " << interface_ref.value()
409-
<< "\n " << e.what()
410-
<< "\n ignoring that the interface is generic" << eom;
407+
debug() << "Interface: " << interface << " of class: " << c.name
408+
<< "\n could not parse signature: " << interface_ref.value()
409+
<< "\n " << e.what()
410+
<< "\n ignoring that the interface is generic" << eom;
411411
class_type.add_base(base);
412412
}
413413
}

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275,21 +275,21 @@ java_method_typet member_type_lazy(
275275
}
276276
else
277277
{
278-
message.warning() << "Method: " << class_name << "." << method_name
279-
<< "\n signature: " << signature.value()
280-
<< "\n descriptor: " << descriptor
281-
<< "\n different number of parameters, reverting to "
282-
"descriptor"
283-
<< message.eom;
278+
message.debug() << "Method: " << class_name << "." << method_name
279+
<< "\n signature: " << signature.value()
280+
<< "\n descriptor: " << descriptor
281+
<< "\n different number of parameters, reverting to "
282+
"descriptor"
283+
<< message.eom;
284284
}
285285
}
286286
catch(const unsupported_java_class_signature_exceptiont &e)
287287
{
288-
message.warning() << "Method: " << class_name << "." << method_name
289-
<< "\n could not parse signature: " << signature.value()
290-
<< "\n " << e.what() << "\n"
291-
<< " reverting to descriptor: " << descriptor
292-
<< message.eom;
288+
message.debug() << "Method: " << class_name << "." << method_name
289+
<< "\n could not parse signature: " << signature.value()
290+
<< "\n " << e.what() << "\n"
291+
<< " reverting to descriptor: " << descriptor
292+
<< message.eom;
293293
}
294294
}
295295
return to_java_method_type(*member_type_from_descriptor);

jbmc/src/java_bytecode/java_class_loader.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,10 @@ java_class_loadert::get_parse_tree(
164164
++parse_tree_it;
165165
break;
166166
}
167-
warning()
168-
<< "Skipping class " << class_name
169-
<< " marked with OverlayClassImplementation but found before"
170-
" original definition"
171-
<< eom;
167+
debug() << "Skipping class " << class_name
168+
<< " marked with OverlayClassImplementation but found before"
169+
" original definition"
170+
<< eom;
172171
}
173172
auto unloaded_or_overlay_out_of_order_it = parse_tree_it;
174173
++parse_tree_it;
@@ -180,9 +179,8 @@ java_class_loadert::get_parse_tree(
180179
// Remove non-initial classes that aren't overlays
181180
if(!is_overlay_class(parse_tree_it->parsed_class))
182181
{
183-
warning()
184-
<< "Skipping duplicate definition of class " << class_name
185-
<< " not marked with OverlayClassImplementation" << eom;
182+
debug() << "Skipping duplicate definition of class " << class_name
183+
<< " not marked with OverlayClassImplementation" << eom;
186184
auto duplicate_non_overlay_it = parse_tree_it;
187185
++parse_tree_it;
188186
parse_trees.erase(duplicate_non_overlay_it);
@@ -194,7 +192,7 @@ java_class_loadert::get_parse_tree(
194192
return parse_trees;
195193

196194
// Not found or failed to load
197-
warning() << "failed to load class " << class_name << eom;
195+
debug() << "failed to load class " << class_name << eom;
198196
parse_trees.emplace_back(class_name);
199197
return parse_trees;
200198
}

0 commit comments

Comments
 (0)