Sylwester Lachiewicz created THRIFT-6346:
--------------------------------------------

             Summary: Remove dead code from the Java ME, Dart, Mermaid and XSD 
generators
                 Key: THRIFT-6346
                 URL: https://issues.apache.org/jira/browse/THRIFT-6346
             Project: Thrift
          Issue Type: Improvement
          Components: XML/XSD - Compiler, Dart - Compiler, JavaME - Compiler, 
Mermaid - Compiler
    Affects Versions: 0.25.0
            Reporter: Sylwester Lachiewicz


Found while porting the generators function for function:
* 
[t_javame_generator::generate_generic_field_getters_setters|https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_javame_generator.cc#L1563]
 builds its getters and setters into local streams and never writes them 
({{(void)out}}); {{get_java_type_string}} and 
{{generate_field_value_meta_data}} in the same file have no callers.
* 
[t_dart_generator::get_dart_type_string|https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_dart_generator.cc#L1363]
 has no callers.
* 
[t_mmd_generator.cc:125|https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_mmd_generator.cc#L125]
 assigns {{service_name_}} right after {{t_generator::generate_program}} has 
assigned the same value, and never reads it.
* 
[t_xsd_generator::generate_service|https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_xsd_generator.cc#L286]
 stores each exception field's type in a {{map<string, t_struct*>}} through a 
C-style cast although the type can be a {{t_typedef}}; every reader only needs 
a {{t_type*}}.

Removing them changes no output (checked on tutorial.thrift for all four 
generators).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to