Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
1.6.1
-
None
-
None
-
windows xp sp3, groovy 1.6.1
Description
Executing following lines
String templateString = "First line \r\nSecond line" def template = new GStringTemplateEngine().createTemplate(templateString).make() println templateString.bytes println template.toString().bytes println System.getProperty("line.separator").getBytes()
prints
[70, 105, 114, 115, 116, 32, 108, 105, 110, 101, 32, 13, 10, 83, 101, 99, 111, 110, 100, 32, 108, 105, 110, 101] [70, 105, 114, 115, 116, 32, 108, 105, 110, 101, 32, 10, 83, 101, 99, 111, 110, 100, 32, 108, 105, 110, 101] [13, 10]
As you can see second byte array is shorter then first one. Is this expected behavior or this is a bug?