mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8276926: Use String.valueOf() when initializing File.separator and File.pathSeparator
Reviewed-by: redestad, jlaskey
This commit is contained in:
parent
a0b84453b0
commit
0f23c6a9fe
1 changed files with 2 additions and 2 deletions
|
@ -220,7 +220,7 @@ public class File
|
|||
* string for convenience. This string contains a single character, namely
|
||||
* {@link #separatorChar}.
|
||||
*/
|
||||
public static final String separator = "" + separatorChar;
|
||||
public static final String separator = String.valueOf(separatorChar);
|
||||
|
||||
/**
|
||||
* The system-dependent path-separator character. This field is
|
||||
|
@ -239,7 +239,7 @@ public class File
|
|||
* for convenience. This string contains a single character, namely
|
||||
* {@link #pathSeparatorChar}.
|
||||
*/
|
||||
public static final String pathSeparator = "" + pathSeparatorChar;
|
||||
public static final String pathSeparator = String.valueOf(pathSeparatorChar);
|
||||
|
||||
|
||||
/* -- Constructors -- */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue