kaister3 edited a comment on issue #2349:
URL:
https://github.com/apache/servicecomb-java-chassis/issues/2349#issuecomment-817739409
可以用instanceof来判断是string还是list。
```java
@SuppressWarnings("unchecked")
public List<String> getFileSources() {
Object property = finalConfig.getProperty(FILE_SOURCE);
if (property instanceof String) {
List<String> result = new ArrayList<>();
result.add((String) property);
return result;
} else if (property instanceof List) {
return (List<String>) property;
}
return new ArrayList<>();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]