Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.1-beta-2
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Environment:$ uname -a
CYGWIN_NT-6.0 hrk-PC 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
$ groovy -v
Groovy Version: 1.1-beta-2-SNAPSHOT JVM: 1.5.0_12-b04
-
Patch Submitted:Yes
-
Number of attachments :
Description
It's expected that "System.getProperty("file.encoding", "US-ASCII")" would be
executed if "System.getProperty("groovy.source.encoding")" threw an exception.
But there's possibility that "System.getProperty("groovy.source.encoding")"
returned null. So it's needed to enclose each "System.getProperty()" in
try-catch block and check the variable "encoding" before
"System.getProperty("file.encoding", "US-ASCII")" and
"setSourceEncoding(encoding)."
fixed, the platform default is now used if all things fail and if someone forcefully sets then encoding to null, then US-ASCII is used (Groovy does not expect a null as encoding)