floomm / ghidrion

2 stars 0 forks source link

Code cleanup #41

Closed riesentoaster closed 1 year ago

riesentoaster commented 1 year ago

Closes #35

riesentoaster commented 1 year ago

What's up with these commented lines in TraceFileToYamlConverter?

    /**
     * Convert the information in the @param traceFile to yaml code.
     * 
     * @param   traceFile to write to disk
     * @return  traceFile as yaml code
     */
    public static String toYaml(MorionInitTraceFile traceFile) {
        Map<String, Object> traceFileDump = new HashMap<>();
        traceFileDump.put(HOOKS, getHooksMap(traceFile));
        traceFileDump.put(STATES, getStatesMap(traceFile));
        // traceFileDump.put(INFO, traceFile.getInfo());
        // traceFileDump.put(INSTRUCTIONS, traceFile.getInstructions());
        return new Yaml().dump(traceFileDump);
    }
floomm commented 1 year ago

What's up with these commented lines in TraceFileToYamlConverter?

  /**
   * Convert the information in the @param traceFile to yaml code.
   * 
   * @param   traceFile to write to disk
   * @return  traceFile as yaml code
   */
  public static String toYaml(MorionInitTraceFile traceFile) {
      Map<String, Object> traceFileDump = new HashMap<>();
      traceFileDump.put(HOOKS, getHooksMap(traceFile));
      traceFileDump.put(STATES, getStatesMap(traceFile));
      // traceFileDump.put(INFO, traceFile.getInfo());
      // traceFileDump.put(INSTRUCTIONS, traceFile.getInstructions());
      return new Yaml().dump(traceFileDump);
  }

These are from the very beginning when I read and saved all trace file fields in every case. I remember, at the time you changed the data structure to only include hooks and states these were commented out. Because we thought we might need them again for the display part. But now having the MorionInitTraceFile and MorionTraceFile classes, we don't need them anymore.

So, they can be removed.