We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 181279c commit 239d6e0Copy full SHA for 239d6e0
builtins/src/main/java/org/jline/builtins/Source.java
@@ -1,5 +1,5 @@
1
/*
2
- * Copyright (c) 2002-2016, the original author or authors.
+ * Copyright (c) 2002-2022, the original author or authors.
3
*
4
* This software is distributable under the BSD license. See the terms of the
5
* BSD license in the documentation provided with this software.
@@ -104,6 +104,9 @@ public void close() throws IOException {
104
}
105
};
106
107
+ if (this.in.markSupported()) {
108
+ this.in.mark(Integer.MAX_VALUE);
109
+ }
110
this.name = name;
111
112
@@ -114,6 +117,9 @@ public String getName() {
114
117
115
118
@Override
116
119
public InputStream read() throws IOException {
120
+ if (in.markSupported()) {
121
+ in.reset();
122
123
return in;
124
125
0 commit comments