Community
Participate
Working Groups
When String concatenation style is used, wrong code is generated, for example: public class A { String ss[]; @Override public String toString() { final int maxLen = 10; return "A [ss=" + ss != null ? Arrays.asList(ss).subList(0, Math.min(ss.length, maxLen)) : null + "]"; } } The "ss != null ? .. : null" fragments should be enclosed in parenthesis, otherwise there's a compilation error or unexpected behavior.
Created attachment 134850 [details] fix
Looks fixed to me in I200908-2000.
Missing steps in comment 0: - uncheck "Skip null values" - check the other two boxes Dani, can you please review the fix? OK to release from my side.
Committed to HEAD with updated copyright date and added bug URL. Available in builds >= I20090511-2000.
Verified in I20090514-2000.