Provide type information for optional thread dump endpoint response fields

Closes gh-15989
This commit is contained in:
Andy Wilkinson 2019-02-19 09:12:54 +00:00
parent 0335a28630
commit 55426208ab
1 changed files with 8 additions and 7 deletions

View File

@ -84,20 +84,21 @@ public class ThreadDumpEndpointDocumentationTests
.description( .description(
"Description of the object on which the " "Description of the object on which the "
+ "thread is blocked, if any.") + "thread is blocked, if any.")
.optional(), .optional().type(JsonFieldType.STRING),
fieldWithPath("threads.[].lockInfo").description( fieldWithPath("threads.[].lockInfo")
.description(
"Object for which the thread is blocked " "Object for which the thread is blocked "
+ "waiting.") + "waiting.")
.optional(), .optional().type(JsonFieldType.OBJECT),
fieldWithPath("threads.[].lockInfo.className") fieldWithPath("threads.[].lockInfo.className")
.description( .description(
"Fully qualified class name of the lock" "Fully qualified class name of the lock"
+ " object.") + " object.")
.optional(), .optional().type(JsonFieldType.STRING),
fieldWithPath("threads.[].lockInfo.identityHashCode") fieldWithPath("threads.[].lockInfo.identityHashCode")
.description( .description(
"Identity hash code of the lock object.") "Identity hash code of the lock object.")
.optional(), .optional().type(JsonFieldType.NUMBER),
fieldWithPath("threads.[].lockedMonitors").description( fieldWithPath("threads.[].lockedMonitors").description(
"Monitors locked by this thread, if any"), "Monitors locked by this thread, if any"),
fieldWithPath("threads.[].lockedMonitors.[].className") fieldWithPath("threads.[].lockedMonitors.[].className")