Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support system-property variable expansion in annotation attributes #428

Closed
remkop opened this issue Aug 3, 2018 · 2 comments
Closed

Support system-property variable expansion in annotation attributes #428

remkop opened this issue Aug 3, 2018 · 2 comments

Comments

@remkop
Copy link
Owner

remkop commented Aug 3, 2018

Needed for junit-team/junit5#1498

Example use case: splitting path elements by the File.pathSeparator value. Annotations require values to be constants, so this won't compile: @Option(split = File.pathSeparator).

Anticipated usage:

@Option(names = {"-cp", "--classpath"}, 
    split = "${sys:path.separator}",
    description = "Provide additional classpath entries.")
private List<Path> additionalClasspathEntries;
@remkop remkop modified the milestones: 3.5, 3.6 Aug 3, 2018
@remkop
Copy link
Owner Author

remkop commented Aug 4, 2018

For the junit use case we can simply specify a regex that allows both the Windows and the Unix path separator:

split = “:|;”

@remkop remkop modified the milestones: 3.5, 3.6 Aug 5, 2018
@remkop remkop modified the milestones: 3.6, backlog Aug 15, 2018
@remkop remkop modified the milestones: backlog, 4.0 Nov 10, 2018
@remkop remkop added the status: duplicate 👨🏻‍🤝‍👨🏻 A duplicate of another issue label Nov 10, 2018
@remkop remkop modified the milestones: 4.0, 4.0-alpha-2 Apr 11, 2019
@remkop
Copy link
Owner Author

remkop commented Apr 17, 2019

Implemented in master.

@remkop remkop closed this as completed Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant