Skip to content

Commit 73f9923

Browse files
committed
Don't allow references to the java.sql JPMS module
1 parent ae01954 commit 73f9923

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<!DOCTYPE import-control PUBLIC
19+
"-//Checkstyle//DTD ImportControl Configuration 1.4//EN"
20+
"https://checkstyle.org/dtds/import_control_1_4.dtd">
21+
<import-control pkg="org.apache.commons.lang3" strategyOnMismatch="allowed">
22+
<disallow pkg="java.sql" />
23+
<disallow pkg="javax.sql" />
24+
</import-control>

src/site/resources/checkstyle/checkstyle.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,9 @@ limitations under the License.
8585
<module name="UpperEll" />
8686
<module name="WhitespaceAfter"/>
8787
<module name="WhitespaceAround"/>
88+
<module name="ImportControl">
89+
<property name="file" value="src/conf/checkstyle/import-control.xml"/>
90+
<property name="path" value="^.*[\\/]src[\\/]main[\\/].*$"/>
91+
</module>
8892
</module>
8993
</module>

0 commit comments

Comments
 (0)