Skip to content

Commit 7fd9cfe

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Provide a default implementation of PlatformTestStorage openInternal apis.
These APIs will move to restricted scope in a subsequent CL. and thus providing a default implementation ensures implementations of PlatformTestStorage do not need to implement them. PiperOrigin-RevId: 625063310
1 parent 79bce45 commit 7fd9cfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

runner/monitor/java/androidx/test/platform/io/PlatformTestStorage.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ public interface PlatformTestStorage {
101101
* @return an InputStream to the given test file.
102102
* @throws FileNotFoundException if pathname does not exist
103103
*/
104-
InputStream openInternalInputFile(String pathname) throws FileNotFoundException;
104+
default InputStream openInternalInputFile(String pathname) throws FileNotFoundException {
105+
return openInputFile(pathname);
106+
}
105107

106108
/**
107109
* Provides an OutputStream to an internal file used by the testing infrastructure.
@@ -110,7 +112,9 @@ public interface PlatformTestStorage {
110112
* @return an OutputStream to the given output file.
111113
* @throws FileNotFoundException if pathname does not exist
112114
*/
113-
OutputStream openInternalOutputFile(String pathname) throws FileNotFoundException;
115+
default OutputStream openInternalOutputFile(String pathname) throws FileNotFoundException {
116+
return openOutputFile(pathname);
117+
}
114118

115119
/**
116120
* Provides a Uri to a test file dependency.

0 commit comments

Comments
 (0)