Constructs a new file using the specified directory and name. @param dir the directory where the file is stored. @param name the file's name. @throws NullPointerException if name is null.
(File dir, String name)
| 111 | * if {@code name} is {@code null}. |
| 112 | */ |
| 113 | public File(File dir, String name) { |
| 114 | if (name == null) { |
| 115 | throw new NullPointerException(); |
| 116 | } |
| 117 | if (dir == null) { |
| 118 | this.path = fixSlashes(name); |
| 119 | } else { |
| 120 | this.path = calculatePath(dir.getPath(), name); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Constructs a new file using the specified path. |
nothing calls this directly
no test coverage detected