Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
mpalourdio committed May 7, 2024
1 parent e798ee6 commit 9ae78f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage</id>
<configuration>
<executable>true</executable>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class FlhackerApplication {
fun run(): CommandLineRunner {
return CommandLineRunner { args ->
AudiofileHandler.setUp()
val cmd: CommandLine? = CliHandler.run(args)
val cmd: CommandLine = CliHandler.run(args)
try {
AudiofileHandler.extractResizeSaveArtwork(cmd?.getOptionValue(CliHandler.FILE_CMD_LONG_OPTION))
AudiofileHandler.extractResizeSaveArtwork(cmd.getOptionValue(CliHandler.FILE_CMD_LONG_OPTION))
AudiofileHandler.generateAsciiArt()
} finally {
AudiofileHandler.tearDown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object AudiofileHandler {
ReadOnlyFileException::class,
IOException::class
)
fun extractResizeSaveArtwork(audioFilePath: String?) {
fun extractResizeSaveArtwork(audioFilePath: String) {
val audioFile = File(audioFilePath)
val extractedArtwork = AudioFileIO.read(audioFile)
.tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import kotlin.system.exitProcess
object CliHandler {
const val FILE_CMD_LONG_OPTION: String = "file"

fun run(args: Array<String?>?): CommandLine? {
fun run(args: Array<String>): CommandLine {
val options = Options()
val input =
Option("f", FILE_CMD_LONG_OPTION, true, "audio file path which contains the artwork to print")
Expand Down

0 comments on commit 9ae78f9

Please sign in to comment.