Skip to content

Reduce usage of pathSeparatorChar for non-path Opt values #1062

Description

@Marcono1234

Problem

Currently OptParser#stringListSetting(String, String) uses File.pathSeparatorChar as separator, but stringListSetting is used by multiple Opt values which are not actually path-related, for example:

  • instrumentation_includes
  • custom_hook_includes
  • trace
  • ...

This is quite confusing, e.g. I used instrument (which splits always by ,), then switched to instrumentation_includes and instrumentation_excludes for finer control and encountered an error because those split by : / ;.

This can also make configuring Jazzer more difficult because the path separator differs between OS (Linux :, Windows ;), so you cannot put them in the OS-agnostic junit-platform.properties file anymore.

Suggested solution

Only use pathSeparatorChar for options which are actually path-based, and adjust documentation which currently refers to : / ; if necessary.

Maybe also consider refactoring OptParser so that stringListSetting splits by , by default and add a separate method whose name makes it clear that it splits by pathSeparatorChar to avoid accidental usage (which might be the cause for the current inconsistencies?)?

Not sure if this here has to be adjusted as well as part of the changes:

return Arrays.stream(allDisabledHooks.split(String.valueOf(File.pathSeparatorChar)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions