aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
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
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')
-rw-r--r--src/java/org/apache/poi/ss/util/PropertyTemplate.java4
-rw-r--r--src/java/org/apache/poi/ss/util/RegionUtil.java2
2 files changed, 3 insertions, 3 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;
}
diff --git a/src/java/org/apache/poi/ss/util/RegionUtil.java b/src/java/org/apache/poi/ss/util/RegionUtil.java
index 5434aa3806..7846d015a8 100644
--- a/src/java/org/apache/poi/ss/util/RegionUtil.java
+++ b/src/java/org/apache/poi/ss/util/RegionUtil.java
@@ -42,7 +42,7 @@ public final class RegionUtil {
public CellPropertySetter(String propertyName, int value) {
_propertyName = propertyName;
- _propertyValue = Short.valueOf((short) value);
+ _propertyValue = Integer.valueOf(value);
}
public CellPropertySetter(String propertyName, BorderStyle value) {
_propertyName = propertyName;