aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss/util/PropertyTemplate.java
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2018-03-03 01:48:46 +0000
committerPJ Fanning <fanningpj@apache.org>2018-03-03 01:48:46 +0000
commit6791e333655bcb157152993cd4ec06975017c2da (patch)
tree207746a215199233ab9709abe8ca578e5fe10539 /src/java/org/apache/poi/ss/util/PropertyTemplate.java
parent9afcf5ae4365a8e2453a293f2b952e22d19e2e0b (diff)
downloadpoi-6791e333655bcb157152993cd4ec06975017c2da.tar.gz
poi-6791e333655bcb157152993cd4ec06975017c2da.zip
remove some casts to short
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1825749 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/util/PropertyTemplate.java')
-rw-r--r--src/java/org/apache/poi/ss/util/PropertyTemplate.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/org/apache/poi/ss/util/PropertyTemplate.java b/src/java/org/apache/poi/ss/util/PropertyTemplate.java
index 7b310cdbd7..b19ea9f713 100644
--- a/src/java/org/apache/poi/ss/util/PropertyTemplate.java
+++ b/src/java/org/apache/poi/ss/util/PropertyTemplate.java
@@ -958,8 +958,8 @@ public final class PropertyTemplate {
* @return short value, or 0 if not a short
*/
private static short getShort(Object value) {
- if (value instanceof Short) {
- return ((Short) value).shortValue();
+ if (value instanceof Number) {
+ return ((Number) value).shortValue();
}
return 0;
}