Skip to content

Commit 0b5c8a5

Browse files
committed
another arch test
1 parent 328a0c5 commit 0b5c8a5

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/main/java/org/htmlunit/websocket/JettyWebSocketAdapter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
import 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
*/

src/test/java/org/htmlunit/archunit/ArchitectureTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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
*/

0 commit comments

Comments
 (0)