Skip to content

Commit

Permalink
Code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed May 27, 2019
1 parent dfb6009 commit f820434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/net/thauvin/erik/pinboard/PinboardPoster.kt
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ open class PinboardPoster() {
try {
val document = factory.newDocumentBuilder().parse(InputSource(StringReader(response)))

val code = document.getElementsByTagName(
"result")?.item(0)?.attributes?.getNamedItem("code")?.nodeValue
val code = document.getElementsByTagName("result")?.item(0)?.attributes?.getNamedItem(
"code")?.nodeValue

if (!code.isNullOrBlank()) {
throw IOException("An error has occurred while executing $method: $code")
Expand Down

0 comments on commit f820434

Please sign in to comment.