-
Notifications
You must be signed in to change notification settings - Fork 273
[TG-1157] Fix pretty printing routine #1617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
7d37272
0a0fa08
8a9aa0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,17 @@ | |
// qualifiers, or the type as it was passed otherwise. | ||
static std::string pretty_print_java_type(const std::string &fqn_java_type) | ||
{ | ||
const std::string java_lang("java::java.lang."); | ||
const std::string package_name(java_class_to_package(fqn_java_type) + "."); | ||
if(package_name == java_lang) | ||
return fqn_java_type.substr(java_lang.length()); | ||
return fqn_java_type; | ||
std::string result; | ||
const std::string java_cbmc_string("java::"); | ||
// Remove the java internal cbmc identifier | ||
if(fqn_java_type.substr(0, java_cbmc_string.length()) == java_cbmc_string) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
result = fqn_java_type.substr(java_cbmc_string.length()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use |
||
// If the remaining has the "java.lang." string as well, trim it | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please precise similar to "If the class is in package |
||
const std::string java_lang_string("java.lang."); | ||
const std::string package_name(java_class_to_package(result) + "."); | ||
if(package_name == java_lang_string) | ||
result = result.substr(java_lang_string.length()); | ||
return result; | ||
} | ||
|
||
generate_java_generic_typet::generate_java_generic_typet( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This should probably be
Remove the CBMC internal java identifier