Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/java.base/share/classes/java/io/FileInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.checkerframework.checker.index.qual.LTLengthOf;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.mustcall.qual.MustCallAlias;
import org.checkerframework.dataflow.qual.SideEffectFree;
import org.checkerframework.framework.qual.AnnotatedFor;

import java.nio.channels.FileChannel;
Expand Down Expand Up @@ -111,6 +112,7 @@ public class FileInputStream extends InputStream
* to the file.
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@SideEffectFree
public FileInputStream(String name) throws FileNotFoundException {
this(name != null ? new File(name) : null);
}
Comment thread
mernst marked this conversation as resolved.
Expand Down Expand Up @@ -142,6 +144,7 @@ public FileInputStream(String name) throws FileNotFoundException {
* @see java.io.File#getPath()
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@SideEffectFree
public FileInputStream(File file) throws FileNotFoundException {
String name = (file != null ? file.getPath() : null);
@SuppressWarnings("removal")
Expand Down