Skip to content

Commit 72add90

Browse files
committed
Fixing last code style issue
1 parent 20427e6 commit 72add90

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/scala/de/upb/cs/swt/delphi/cli/CsvOutput.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ class CsvOutput(config: Config) {
5151
}
5252

5353
def resultsToCsv(results : Seq[Result]) : Seq[Array[String]] = {
54-
if (results.isEmpty) {
55-
Seq.empty[Array[String]]
54+
val headOption = results.headOption.getOrElse()
55+
if (!headOption.isInstanceOf[Result]) {
56+
Seq.empty[Array[String]]
5657
} else {
57-
val fieldNames = results.headOption.get.fieldNames()
58+
val fieldNames = headOption.asInstanceOf[Result].fieldNames()
5859
val tableHeader : Array[String] =
5960
fieldNames.+:("discovered at").+:("version").+:("groupId").+:("artifactId").+:("source").+:("Id").toArray
6061
results.map {

0 commit comments

Comments
 (0)