File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
main/java/org/htmlunit/websocket
test/java/org/htmlunit/archunit Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2727import org .htmlunit .jetty .websocket .client .WebSocketClient ;
2828
2929/**
30- * Jetty based impl of the WebSocketAdapter.
30+ * Jetty9 based impl of the WebSocketAdapter.
31+ * To avoid conflicts with other jetty versions used by projects, we use
32+ * our own shaded version of jetty9 (https://github.com/HtmlUnit/htmlunit-websocket-client).
3133 *
3234 * @author Ronald Brill
3335 */
Original file line number Diff line number Diff line change @@ -90,6 +90,19 @@ public class ArchitectureTest {
9090 .and ().resideOutsideOfPackage ("org.htmlunit.jetty.." )
9191 .should ().dependOnClassesThat ().resideInAnyPackage ("java.awt.." );
9292
93+ /**
94+ * The jetty websocket stuff is only used by one class.
95+ */
96+ @ ArchTest
97+ public static final ArchRule webSocketPackageRule = noClasses ()
98+ .that ()
99+ .resideOutsideOfPackage ("org.htmlunit.jetty.." )
100+ .and ().doNotHaveFullyQualifiedName ("org.htmlunit.websocket.JettyWebSocketAdapter" )
101+ .and ().doNotHaveFullyQualifiedName ("org.htmlunit.websocket.JettyWebSocketAdapter$JettyWebSocketAdapterFactory" )
102+ .and ().doNotHaveFullyQualifiedName ("org.htmlunit.websocket.JettyWebSocketAdapter$JettyWebSocketAdapterImpl" )
103+ .should ()
104+ .dependOnClassesThat ().resideInAnyPackage ("org.htmlunit.jetty.." );
105+
93106 /**
94107 * JsxClasses are always in the javascript package.
95108 */
You can’t perform that action at this time.
0 commit comments