Skip to content

Commit 4dea4a7

Browse files
authored
HADOOP-18027. Include static imports in the maven plugin rules (#3733)
Reviewed-by: Steve Loughran <stevel@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
1 parent 1ebdac2 commit 4dea4a7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,23 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
182182
<reason>Use hadoop-thirdparty shaded instead of curator shaded</reason>
183183
<bannedImports>
184184
<bannedImport>org.apache.curator.shaded.**</bannedImport>
185+
<bannedImport>static org.apache.curator.shaded.**</bannedImport>
185186
</bannedImports>
186187
</restrictImports>
187188
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
188189
<includeTestCode>true</includeTestCode>
189190
<reason>Use hadoop-common provided Sets rather than Guava provided Sets</reason>
190191
<bannedImports>
191192
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Sets</bannedImport>
193+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.collect.Sets.**</bannedImport>
192194
</bannedImports>
193195
</restrictImports>
194196
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
195197
<includeTestCode>true</includeTestCode>
196198
<reason>Use hadoop-common provided Lists rather than Guava provided Lists</reason>
197199
<bannedImports>
198200
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Lists</bannedImport>
201+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.collect.Lists.**</bannedImport>
199202
</bannedImports>
200203
</restrictImports>
201204
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
@@ -210,48 +213,55 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
210213
<reason>Use alternatives to Guava common classes</reason>
211214
<bannedImports>
212215
<bannedImport>com.google.common.**</bannedImport>
216+
<bannedImport>static com.google.common.**</bannedImport>
213217
</bannedImports>
214218
</restrictImports>
215219
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
216220
<includeTestCode>true</includeTestCode>
217221
<reason>Use alternative to Guava provided BaseEncoding</reason>
218222
<bannedImports>
219223
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.io.BaseEncoding</bannedImport>
224+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.io.BaseEncoding.**</bannedImport>
220225
</bannedImports>
221226
</restrictImports>
222227
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
223228
<includeTestCode>true</includeTestCode>
224229
<reason>Use alternative to Guava provided Optional</reason>
225230
<bannedImports>
226231
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Optional</bannedImport>
232+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Optional.**</bannedImport>
227233
</bannedImports>
228234
</restrictImports>
229235
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
230236
<includeTestCode>true</includeTestCode>
231237
<reason>Use alternative to Guava provided Function</reason>
232238
<bannedImports>
233239
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Function</bannedImport>
240+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Function.**</bannedImport>
234241
</bannedImports>
235242
</restrictImports>
236243
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
237244
<includeTestCode>true</includeTestCode>
238245
<reason>Use alternative to Guava provided Predicate</reason>
239246
<bannedImports>
240247
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Predicate</bannedImport>
248+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Predicate.**</bannedImport>
241249
</bannedImports>
242250
</restrictImports>
243251
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
244252
<includeTestCode>true</includeTestCode>
245253
<reason>Use alternative to Guava provided Supplier</reason>
246254
<bannedImports>
247255
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Supplier</bannedImport>
256+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.base.Supplier.**</bannedImport>
248257
</bannedImports>
249258
</restrictImports>
250259
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
251260
<includeTestCode>true</includeTestCode>
252261
<reason>Use alternative to Guava provided ImmutableListMultimap</reason>
253262
<bannedImports>
254263
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap</bannedImport>
264+
<bannedImport>static org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap.**</bannedImport>
255265
</bannedImports>
256266
</restrictImports>
257267
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">

0 commit comments

Comments
 (0)