File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Sources/SwiftJavaTool/Commands Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -267,9 +267,19 @@ extension SwiftJava.WrapJavaCommand {
267267
268268 private func shouldImportJavaClass( _ javaClassName: String , config: Configuration ) -> Bool {
269269 // If we have an inclusive filter, import only types from it
270- for include in config. filterInclude ?? [ ] {
271- guard javaClassName. starts ( with: include) else {
272- log. info ( " Skip Java type: \( javaClassName) (does not match include filter: \( include) ) " )
270+ if let includes = config. filterInclude, !includes. isEmpty {
271+ let anyIncludeFilterMatched = includes. contains { include in
272+ if javaClassName. starts ( with: include) {
273+ // TODO: lower to trace level
274+ log. info ( " Skip Java type: \( javaClassName) (does not match any include filter) " )
275+ return true
276+ }
277+
278+ return false
279+ }
280+
281+ guard anyIncludeFilterMatched else {
282+ log. info ( " Skip Java type: \( javaClassName) (does not match any include filter) " )
273283 return false
274284 }
275285 }
You can’t perform that action at this time.
0 commit comments