The following classes/methods use the platform's default encoding and as
such are inherently platform-dependent. However, platform-dependence is
usually not what Java developers seek. Hence a new check would be nice to
detect accidental usage of these APIs:
- FileWriter()
- FileReader()
- InputStreamReader(InputStream)
- OutputStreamWriter(OutputStream)
- String.getBytes()
- String(byte[])
- String(byte[], int, int)
- Scanner(InputStream)
- Scanner(File)
- Scanner(ReadableByteChannel)
Note: Method signatures are complete, i.e. getBytes() does not mean to
refer to getBytes(String).
Nobody/Anonymous
None
None
Public
|
Date: 2009-05-12 07:08 All constructors for FileWriter and FileReader should be banned, as they |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use