Find why 'map.get(argsList.get(j))' could be java.time.LocalDateTime (not-null)
时间: 2023-07-16 19:15:44 浏览: 101
It's difficult to provide a specific answer without seeing the context of the code, but generally speaking, if `map` is a `Map` object and `argsList` is a list of keys for the map, then `map.get(argsList.get(j))` could return a `java.time.LocalDateTime` object if the value stored in the map corresponding to the key at index `j` is a `LocalDateTime`.
If the map is defined as `Map<String, Object>`, then any type of object can be stored as values in the map. If the value stored in the map is a `LocalDateTime` object, then calling `map.get(argsList.get(j))` will return that object, which could explain why it's returning a `LocalDateTime`.
To be sure, you can check the data type of the value stored in the map using the `instanceof` operator. For example:
```
Object value = map.get(argsList.get(j));
if (value instanceof LocalDateTime) {
LocalDateTime localDateTime = (LocalDateTime) value;
// Do something with localDateTime
}
```
阅读全文