Skip to content

Commit 55ed633

Browse files
committed
Cleanup of a few warnings
1 parent 10f84a6 commit 55ed633

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

csv-validator-ui/src/main/scala/uk/gov/nationalarchives/csv/validator/ui/CsvValidatorUi.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ object CsvValidatorUi extends SimpleSwingApplication {
100100
}
101101

102102
private def extractFromManifest[T](extractor: Attributes => T): Option[T] = {
103-
val clazz = getClass()
103+
val clazz = getClass
104104
val className = clazz.getSimpleName + ".class"
105-
val classPath = clazz.getResource(className).toString()
105+
val classPath = clazz.getResource(className).toString
106106
if (!classPath.startsWith("jar")) {
107107
None // Class not from JAR
108108
} else {
@@ -346,7 +346,7 @@ object CsvValidatorUi extends SimpleSwingApplication {
346346
Swing.onEDT {
347347
progressBar.max = total
348348
progressBar.value = processed
349-
progressBar.label = s"Line ${processed} of ${total}"
349+
progressBar.label = s"Line $processed of $total"
350350
}
351351
}
352352
}
@@ -417,11 +417,11 @@ object CsvValidatorUi extends SimpleSwingApplication {
417417
updateLastPath(reportFileChooser, path => Settings(path, path, path))
418418
}
419419

420-
private val lblVersion = new Label(s"Version: ${getShortVersion}")
420+
private val lblVersion = new Label(s"Version: $getShortVersion")
421421
lblVersion.listenTo(lblVersion.mouse.clicks)
422422
lblVersion.font = lblVersion.font.deriveFont(9)
423423
lblVersion.reactions += onClick {
424-
Dialog.showMessage(this, getLongVersion.map(x => s"${x._1}: ${x._2}").mkString(System.getProperty("line.separator")), "Version Details")
424+
Dialog.showMessage(this, getLongVersion.map(x => s"${x._1}: ${x._2}").mkString(java.lang.System.lineSeparator()), "Version Details")
425425
}
426426

427427
layout.row.grid(lblCsvFile).add(txtCsvFile, 5).add(btnChooseCsvFile)
@@ -519,7 +519,7 @@ object CsvValidatorUi extends SimpleSwingApplication {
519519
addToTableDialog(parentFrame, "Add Path Substitution...", rows, tblPathSubstitutions.addRow)
520520
}
521521

522-
private val tblPathSubstitutions = new Table(0, 2) {
522+
private val tblPathSubstitutions: Table = new Table(0, 2) {
523523
preferredViewportSize = new Dimension(500, 70)
524524
model = new DefaultTableModel(Array[Object]("From", "To"), 0)
525525

@@ -532,7 +532,7 @@ object CsvValidatorUi extends SimpleSwingApplication {
532532
}
533533

534534
def pathSubstitutions : List[(String, String)] = {
535-
for(rowIdx <- (0 to model.getRowCount - 1)) yield (model.getValueAt(rowIdx, 0).asInstanceOf[String], model.getValueAt(rowIdx, 1).asInstanceOf[String])
535+
for(rowIdx <- 0 to model.getRowCount - 1) yield (model.getValueAt(rowIdx, 0).asInstanceOf[String], model.getValueAt(rowIdx, 1).asInstanceOf[String])
536536
}.toList
537537
}
538538

0 commit comments

Comments
 (0)