Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335610

DiagnosticFramework: CmdLine::is_executable() correction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • core-svc
    • None
    • b09


      In /src/hotspot/share/services/diagnosticFramework.hpp:

      CmdLine::is_executable() looks wrong, surely an empty line is not executable. I think it should be:

        70 bool is_executable() const { return !is_empty() && _cmd[0] != '#'; }
        
        
      This does not cause a big issue as create_local_DCmd() checks for a null command, but does mean in DCmd::parse_and_execute() we will needlessly enter the code block that would execute the command.

      is_executable() is not used outside of this area.

            kevinw Kevin Walls
            kevinw Kevin Walls
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: