File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
spring-websocket/src/main/java/org/springframework/web/socket/server/jetty Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 33
33
groovyVersion = " 2.5.8"
34
34
hsqldbVersion = " 2.4.1"
35
35
jackson2Version = " 2.9.9"
36
- jettyVersion = " 9.4.20.v20190813 "
36
+ jettyVersion = " 9.4.21.v20190926 "
37
37
junit5Version = " 5.3.2"
38
38
kotlinVersion = " 1.2.71"
39
39
log4jVersion = " 2.11.2"
Original file line number Diff line number Diff line change 30
30
31
31
import org .eclipse .jetty .websocket .api .WebSocketPolicy ;
32
32
import org .eclipse .jetty .websocket .api .extensions .ExtensionConfig ;
33
- import org .eclipse .jetty .websocket .api .extensions .ExtensionFactory ;
34
33
import org .eclipse .jetty .websocket .server .HandshakeRFC6455 ;
35
34
import org .eclipse .jetty .websocket .server .WebSocketServerFactory ;
36
35
@@ -180,14 +179,17 @@ private List<WebSocketExtension> buildWebSocketExtensions() {
180
179
return result ;
181
180
}
182
181
183
- @ SuppressWarnings ({"unchecked" })
182
+ @ SuppressWarnings ({"unchecked" , "deprecation" })
184
183
private Set <String > getExtensionNames () {
185
184
try {
186
- return this .factory .getExtensionFactory (). getExtensionNames ();
185
+ return this .factory .getAvailableExtensionNames ();
187
186
}
188
187
catch (IncompatibleClassChangeError ex ) {
188
+ // Fallback for versions prior to 9.4.21:
189
189
// 9.4.20.v20190813: ExtensionFactory (abstract class -> interface)
190
- Method method = ClassUtils .getMethod (ExtensionFactory .class , "getExtensionNames" );
190
+ // 9.4.21.v20190926: ExtensionFactory (interface -> abstract class) + deprecated
191
+ Class <?> clazz = org .eclipse .jetty .websocket .api .extensions .ExtensionFactory .class ;
192
+ Method method = ClassUtils .getMethod (clazz , "getExtensionNames" );
191
193
return (Set <String >) ReflectionUtils .invokeMethod (method , this .factory .getExtensionFactory ());
192
194
}
193
195
}
You can’t perform that action at this time.
0 commit comments