Refine styling

This commit is contained in:
Mygod
2018-07-29 00:39:45 +08:00
parent 430d97d514
commit 6939efed0d
15 changed files with 140 additions and 42 deletions

View File

@@ -44,7 +44,8 @@ class P2pSupplicantConfiguration(private val initContent: String? = null) : Parc
return try {
val match = pskParser.findAll(content ?: return null).single()
if (match.groups[2] == null && match.groups[3] == null) "" else {
val result = match.groupValues[2] + match.groupValues[3] // only one will match and hold non-empty value
// only one will match and hold non-empty value
val result = match.groupValues[2] + match.groupValues[3]
check(result.length in 8..63)
result
}