Open GoogleCodeExporter opened 8 years ago
Original comment by schal...@darkmist.net
on 23 Sep 2010 at 3:14
I'd like this done before 2.0GA.
Original comment by manico.james@gmail.com
on 2 Nov 2010 at 7:57
Would it be as simple as adding this to the encoder?
public String encodeForOS(String input) {
Codec codec;
if ( System.getProperty("os.name").indexOf("Windows") != -1 ) {
codec = new WindowsCodec();
} else {
codec = new UnixCodec();
}
return this.encodeForOS(codec, input);
}
That method is very similiar to the constructor of the DefaultExecutor, it
would probably be a good idea to create a method that would return the correct
Codec for the current OS that both methods would call.
Original comment by brent.sh...@gmail.com
on 7 Nov 2010 at 4:41
Added affected component.
Original comment by kevin.w.wall@gmail.com
on 12 Feb 2011 at 7:32
Here's how I would implement it.
Original comment by brent.sh...@gmail.com
on 10 Mar 2011 at 4:57
Attachments:
This code looks fine to me, but it may make more sense to store
System.getProperty("os.name") in a static final String since it
should not really be changing dynamically once the Java VM starts
executing. (I.e., it should be constant; virtualization doesn't
migrate processes from one OS type to another.)
Original comment by kevin.w.wall@gmail.com
on 21 Mar 2011 at 5:13
Original comment by manico.james@gmail.com
on 29 May 2012 at 3:25
Original issue reported on code.google.com by
manico.james@gmail.com
on 26 Jul 2010 at 8:48