Use JDK7 and JDK8 Code Features#1564
Conversation
59471c8 to
a464ceb
Compare
matthiasblaesing
left a comment
There was a problem hiding this comment.
You found a whole lot of diamonds ;-)
Thanks for preparing this. I left two inline comments, that might make sense.
| final int alignment = Structure.ALIGN_NONE; | ||
| final String encoding = System.getProperty("file.encoding"); | ||
| Map<String, Object> options = new HashMap<String, Object>(); | ||
| final String encoding = Charset.defaultCharset().displayName(); |
There was a problem hiding this comment.
Not sure here, but the display name, that is even localized, seems wrong. The canonical name of the charset seems to be a better fit:
| final String encoding = Charset.defaultCharset().displayName(); | |
| final String encoding = Charset.defaultCharset().name(); |
Same would apply in line 228
|
|
||
| public void testCustomStringEncoding() throws Exception { | ||
| final String ENCODING = System.getProperty("file.encoding"); | ||
| final String ENCODING = Charset.defaultCharset().displayName(); |
There was a problem hiding this comment.
See comment in DirectTest (same on line 480)
To be fair, Eclipse found them, plus a few others that it shouldn't have. The "Clean Up" tool made this easy.
The suggestion was Eclipse's. Given Eclipse's failure with the diamonds on anonymous subclasses, I trust it less now, so looking into this.
So it looks like your suggestion is a good one, although in theory if someone had a "human readable" I'll update to your suggestion. It's in a test class anyway so not critical, worst case is a failed test someone has to debug. |
Signed-off-by: Daniel Widdis <[email protected]>
|
Will follow up with a similar PR for platform tonight. |
Used IDE cleanup tool with manual reverting of the anonymous inner class fixes to apply the following (each in a separate commit for ease of review or if you only want a portion of the changes):