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

Allow subclasses of CmdLineParser to override expandAtFiles behaviour #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rednoah
Copy link

@rednoah rednoah commented Dec 7, 2015

Allow subclasses of CmdLineParser to override expandAtFiles and how argument files are read and parsed.

@@ -548,7 +548,7 @@ public void parseArgument(final String... args) throws CmdLineException {
* by the @ sequences, split around the line breaks.
* @throws CmdLineException
*/
private String[] expandAtFiles(String args[]) throws CmdLineException {
protected String[] expandAtFiles(String args[]) throws CmdLineException {
List<String> result = new ArrayList<String>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear why whole method needs to be overidable rather than just readAtFile. Since this method takes whole args list as parameter, makes it too easy to do generally bad things.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case. args4j has a habit of having private methods that result in me having to maintain my own fork. I wouldn't expect anyone to extend CmdLineParser unless then know what they're doing.

@rednoah
Copy link
Author

rednoah commented Aug 1, 2016

At the very least I want to be able to specify the Charset what should be used for @files because the same @file will cause different behaviour with Windows and non-Windows platforms because default charsets will be Windows-1252 and UTF-8 respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants