File tree Expand file tree Collapse file tree 4 files changed +49
-7
lines changed
cf-java-logging-support-servlet
main/java/com/sap/hcp/cf/logging/servlet/filter
test/java/com/sap/hcp/cf/logging/servlet/filter Expand file tree Collapse file tree 4 files changed +49
-7
lines changed Original file line number Diff line number Diff line change 14
14
</parent >
15
15
16
16
<properties >
17
- <servlet .api.version>3.0.1 </servlet .api.version>
17
+ <servlet .api.version>3.1.0 </servlet .api.version>
18
18
</properties >
19
19
20
20
<dependencies >
59
59
<dependency >
60
60
<groupId >org.eclipse.jetty</groupId >
61
61
<artifactId >jetty-server</artifactId >
62
- <version >9.4.19.v20190610 </version >
62
+ <version >9.4.35.v20201120 </version >
63
63
<scope >test</scope >
64
64
</dependency >
65
65
<dependency >
66
66
<groupId >org.eclipse.jetty</groupId >
67
67
<artifactId >jetty-servlet</artifactId >
68
- <version >9.4.19.v20190610 </version >
68
+ <version >9.4.35.v20201120 </version >
69
69
<scope >test</scope >
70
70
</dependency >
71
71
<dependency >
Original file line number Diff line number Diff line change 1
1
package com .sap .hcp .cf .logging .servlet .filter ;
2
2
3
3
import java .io .IOException ;
4
- import java .io .OutputStream ;
5
4
5
+ import javax .servlet .ReadListener ;
6
6
import javax .servlet .ServletInputStream ;
7
7
8
8
/**
@@ -106,4 +106,19 @@ public synchronized void reset() throws IOException {
106
106
public boolean markSupported () {
107
107
return wrappedStream .markSupported ();
108
108
}
109
+
110
+ @ Override
111
+ public boolean isFinished () {
112
+ return wrappedStream .isFinished ();
113
+ }
114
+
115
+ @ Override
116
+ public boolean isReady () {
117
+ return wrappedStream .isReady ();
118
+ }
119
+
120
+ @ Override
121
+ public void setReadListener (ReadListener readListener ) {
122
+ wrappedStream .setReadListener (readListener );
123
+ }
109
124
}
Original file line number Diff line number Diff line change 1
1
package com .sap .hcp .cf .logging .servlet .filter ;
2
2
3
3
import java .io .IOException ;
4
- import java .io .OutputStream ;
5
4
6
5
import javax .servlet .ServletOutputStream ;
6
+ import javax .servlet .WriteListener ;
7
7
8
8
public class WrappedOutputStream extends ServletOutputStream {
9
9
10
10
private long contentLength = -1 ;
11
- private final OutputStream wrappedStream ;
11
+ private final ServletOutputStream wrappedStream ;
12
12
13
- public WrappedOutputStream (OutputStream out ) {
13
+ public WrappedOutputStream (ServletOutputStream out ) {
14
14
wrappedStream = out ;
15
15
}
16
16
@@ -53,4 +53,15 @@ public void close() throws IOException {
53
53
public void flush () throws IOException {
54
54
wrappedStream .flush ();
55
55
}
56
+
57
+ @ Override
58
+ public boolean isReady () {
59
+ return wrappedStream .isReady ();
60
+ }
61
+
62
+ @ Override
63
+ public void setWriteListener (WriteListener writeListener ) {
64
+ wrappedStream .setWriteListener (writeListener );
65
+
66
+ }
56
67
}
Original file line number Diff line number Diff line change 8
8
import java .io .IOException ;
9
9
import java .nio .charset .StandardCharsets ;
10
10
11
+ import javax .servlet .ReadListener ;
11
12
import javax .servlet .ServletInputStream ;
12
13
13
14
import org .junit .Test ;
@@ -24,6 +25,21 @@ private static WrappedInputStream wrap(String text) {
24
25
public int read () throws IOException {
25
26
return in .read ();
26
27
}
28
+
29
+ @ Override
30
+ public boolean isFinished () {
31
+ return false ;
32
+ }
33
+
34
+ @ Override
35
+ public boolean isReady () {
36
+ return true ;
37
+ }
38
+
39
+ @ Override
40
+ public void setReadListener (ReadListener readListener ) {
41
+ // nothing to do
42
+ }
27
43
});
28
44
}
29
45
You can’t perform that action at this time.
0 commit comments