We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7292086 commit 3d12be8Copy full SHA for 3d12be8
src/main/groovy/io/openapiprocessor/test/stream/MemoryStreamHandlerProvider.groovy
@@ -32,8 +32,8 @@ class MemoryStreamHandlerProvider extends URLStreamHandlerProvider {
32
33
@Override
34
void connect () throws IOException {
35
- data = getData ()
36
connected = true
+ data = Memory.get (url.path)
37
}
38
39
@@ -43,11 +43,10 @@ class MemoryStreamHandlerProvider extends URLStreamHandlerProvider {
43
44
45
InputStream getInputStream () throws IOException {
46
- return new ByteArrayInputStream (data)
47
- }
+ if(!connected)
+ connect ()
48
49
- private byte[] getData () {
50
- Memory.get (url.path)
+ return new ByteArrayInputStream (data)
51
52
53
0 commit comments