Skip to content

Commit

Permalink
Hide warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wcurrie committed Apr 15, 2016
1 parent 89c0262 commit cf19624
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/io/github/binaryfoo/TagMetaData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class TagMetaData(private val metadata: MutableMap<String, TagInfo>) {
// leave everything as strings
}
})
return TagMetaData(LinkedHashMap((yaml.load(ClasspathIO.open(name)) as Map<String, Map<String, String?>>).mapValues {
@Suppress("UNCHECKED_CAST")
val map = yaml.load(ClasspathIO.open(name)) as Map<String, Map<String, String?>>
return TagMetaData(LinkedHashMap(map.mapValues {
val shortName = it.value["name"]!!
val longName = it.value["longName"] ?: shortName
val decoder: Decoder = if (it.value.contains("decoder")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ class BackgroundReading {
}

private val apduDescriptions: Map<String, Map<String, String?>> by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
Yaml().load(ClasspathIO.open("apdus.yaml")) as Map<String, Map<String, String?>>
@Suppress("UNCHECKED_CAST")
(Yaml().load(ClasspathIO.open("apdus.yaml")) as Map<String, Map<String, String?>>)
}

private val descriptions: Map<String, Map<String, String?>> by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
Yaml().load(ClasspathIO.open("descriptions.yaml")) as Map<String, Map<String, String?>>
@Suppress("UNCHECKED_CAST")
(Yaml().load(ClasspathIO.open("descriptions.yaml")) as Map<String, Map<String, String?>>)
}

}
Expand Down

0 comments on commit cf19624

Please sign in to comment.