@@ -75,7 +75,7 @@ struct JavaToSwift: ParsableCommand {
7575 if jarFile {
7676 generationMode = . configuration( jarFile: input)
7777 } else {
78- let config = try JavaTranslator . readConfiguration ( from: URL ( filePath : input) )
78+ let config = try JavaTranslator . readConfiguration ( from: URL ( fileURLWithPath : input) )
7979 generationMode = . classWrappers( config)
8080 }
8181
@@ -90,7 +90,7 @@ struct JavaToSwift: ParsableCommand {
9090 let swiftModuleName = String ( dependentConfig [ ..< equalLoc] )
9191 let configFileName = String ( dependentConfig [ afterEqual... ] )
9292
93- let config = try JavaTranslator . readConfiguration ( from: URL ( filePath : configFileName) )
93+ let config = try JavaTranslator . readConfiguration ( from: URL ( fileURLWithPath : configFileName) )
9494
9595 return ( swiftModuleName, config)
9696 }
@@ -218,7 +218,7 @@ struct JavaToSwift: ParsableCommand {
218218
219219 print ( " Writing \( description) to ' \( filename) '... " , terminator: " " )
220220 try contents. write (
221- to: Foundation . URL ( filePath : outputDirectory) . appending ( path : filename) ,
221+ to: Foundation . URL ( fileURLWithPath : outputDirectory) . appendingPathComponent ( filename) ,
222222 atomically: true ,
223223 encoding: . utf8
224224 )
@@ -242,7 +242,7 @@ struct JavaToSwift: ParsableCommand {
242242 // If any of the segments of the Java name start with a number, it's a
243243 // local class that cannot be mapped into Swift.
244244 for segment in entry. getName ( ) . split ( separator: " $ " ) {
245- if segment. starts ( with : /\d/ ) {
245+ if let firstChar = segment. first , firstChar . isNumber {
246246 continue
247247 }
248248 }
0 commit comments