diff options
author | Walker Selby <git@walkerselby.com> | 2023-09-29 11:30:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-29 20:30:27 +0200 |
commit | 343d5d9cea12beaf7a8dfabda2f61ad940be592a (patch) | |
tree | ceb0a82790eaa1a1babfe4a2e05220378037a748 /src/main/java/at/hannibal2/skyhanni/test/command | |
parent | b364b6da62668ea44dfc23180fe70c13ec707804 (diff) | |
download | skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.tar.gz skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.tar.bz2 skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.zip |
Random Code Cleanup (#516)
Sonar Lint for the win #516
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/command')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt | 16 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt | 22 |
2 files changed, 6 insertions, 32 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt index 5852c9922..cc909469e 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt @@ -86,11 +86,9 @@ private fun Throwable.getExactStackTrace(full: Boolean, parent: List<String> = e for (traceElement in stackTrace) { var text = "\tat $traceElement" - if (!full) { - if (text in parent) { - println("broke at: $text") - break - } + if (!full && text in parent) { + println("broke at: $text") + break } if (!full) { for ((from, to) in replace) { @@ -98,11 +96,9 @@ private fun Throwable.getExactStackTrace(full: Boolean, parent: List<String> = e } } add(text) - if (!full) { - if (breakAfter.any { text.contains(it) }) { - println("breakAfter: $text") - break - } + if (!full && breakAfter.any { text.contains(it) }) { + println("breakAfter: $text") + break } } diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt index 51c5a28fb..b7c4ae4a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt @@ -135,28 +135,6 @@ object CopyNearbyEntitiesCommand { val skinTexture = entity.getSkinTexture() resultList.add("- skin texture: $skinTexture") - -// val gameProfile = entity.gameProfile -// if (gameProfile == null) { -// resultList.add("- gameProfile is null!") -// } else { -// val id = gameProfile.id -// val name = gameProfile.name -// -// resultList.add("- gameProfile id: $id") -// resultList.add("- gameProfile name: $name") -// val properties = gameProfile.properties -// resultList.add("- gameProfile properties: (${properties.size()})") -// for (entry in properties.entries()) { -// val key = entry.key -// val property = entry.value -// resultList.add("- key: '$key'") -// val name1 = property.name -// val value = property.value -// resultList.add("- property name: '$name1'") -// resultList.add("- property value: '$value'") -// } -// } } } resultList.add("") |