File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 2121//   qualifiers, or the type as it was passed otherwise.
2222static  std::string pretty_print_java_type (const  std::string &fqn_java_type)
2323{
24-   const  std::string java_lang (" java::java.lang."  );
25-   const  std::string package_name (java_class_to_package (fqn_java_type) + " ."  );
26-   if (package_name == java_lang)
27-     return  fqn_java_type.substr (java_lang.length ());
28-   return  fqn_java_type;
24+   std::string result;
25+   const  std::string java_cbmc_string (" java::"  );
26+   //  Remove the java internal cbmc identifier
27+   if (fqn_java_type.substr (0 , java_cbmc_string.length ()) == java_cbmc_string)
28+     result = fqn_java_type.substr (java_cbmc_string.length ());
29+   //  If the remaining has the "java.lang." string as well, trim it
30+   const  std::string java_lang_string (" java.lang."  );
31+   const  std::string package_name (java_class_to_package (result) + " ."  );
32+   if (package_name == java_lang_string)
33+     result = result.substr (java_lang_string.length ());
34+   return  result;
2935}
3036
3137generate_java_generic_typet::generate_java_generic_typet (
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments