|
9 | 9 | * Licensed under the Apache License, Version 2.0 (the "License"); |
10 | 10 | * you may not use this file except in compliance with the License. |
11 | 11 | * You may obtain a copy of the License at |
12 | | - * |
| 12 | + * |
13 | 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
14 | | - * |
| 14 | + * |
15 | 15 | * Unless required by applicable law or agreed to in writing, software |
16 | 16 | * distributed under the License is distributed on an "AS IS" BASIS, |
17 | 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
22 | 22 |
|
23 | 23 | import com.fasterxml.jackson.core.JsonParser; |
24 | 24 | import com.fasterxml.jackson.databind.DeserializationContext; |
25 | | -import com.fasterxml.jackson.databind.JsonNode; |
26 | 25 | import com.fasterxml.jackson.databind.ObjectMapper; |
27 | 26 | import com.fasterxml.jackson.databind.deser.std.StdDeserializer; |
28 | 27 | import com.fasterxml.jackson.databind.node.ObjectNode; |
@@ -50,8 +49,7 @@ public Transaction deserialize(JsonParser jsonParser, DeserializationContext ctx |
50 | 49 | final ObjectMapper objectMapper = (ObjectMapper) jsonParser.getCodec(); |
51 | 50 | final ObjectNode objectNode = objectMapper.readTree(jsonParser); |
52 | 51 |
|
53 | | - final JsonNode transactionTypeJsonNode = objectNode.get("TransactionType"); |
54 | | - final TransactionType transactionType = TransactionType.forValue(transactionTypeJsonNode.asText()); |
| 52 | + TransactionType transactionType = TransactionType.forValue(objectNode.get("TransactionType").asText()); |
55 | 53 | final Class<? extends Transaction> transactionTypeClass = Transaction.typeMap.inverse().get(transactionType); |
56 | 54 |
|
57 | 55 | // Remove the `Account` property from any incoming `UnlModify` JSON about to be deserialized. This is because the |
|
0 commit comments