(JsonInput input)
| 79 | } |
| 80 | |
| 81 | private static Command fromJson(JsonInput input) { |
| 82 | input.beginObject(); |
| 83 | |
| 84 | SessionId sessionId = null; |
| 85 | String name = null; |
| 86 | Map<String, Object> parameters = null; |
| 87 | |
| 88 | while (input.hasNext()) { |
| 89 | switch (input.nextName()) { |
| 90 | case "name": |
| 91 | name = input.nextString(); |
| 92 | break; |
| 93 | |
| 94 | case "parameters": |
| 95 | parameters = input.read(MAP_TYPE); |
| 96 | break; |
| 97 | |
| 98 | case "sessionId": |
| 99 | sessionId = input.read(SessionId.class); |
| 100 | break; |
| 101 | |
| 102 | default: |
| 103 | input.skipValue(); |
| 104 | break; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | input.endObject(); |
| 109 | |
| 110 | //noinspection DataFlowIssue |
| 111 | return new Command(sessionId, name, parameters); |
| 112 | } |
| 113 | } |
nothing calls this directly
no test coverage detected