From 6a377f3cbf756c7453bd8d3f1f4b4364d03de553 Mon Sep 17 00:00:00 2001 From: "Amol S. Deshmukh" Date: Wed, 13 Jul 2005 13:12:39 +0000 Subject: [PATCH] Fix for issue# 35716: additional check added in method hasRange to detect cellrange over a single cell git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353748 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/util/RangeAddress.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/java/org/apache/poi/hssf/util/RangeAddress.java b/src/java/org/apache/poi/hssf/util/RangeAddress.java index f2daf6a513..0f9c31e2e1 100644 --- a/src/java/org/apache/poi/hssf/util/RangeAddress.java +++ b/src/java/org/apache/poi/hssf/util/RangeAddress.java @@ -167,9 +167,7 @@ public class RangeAddress { } public boolean hasRange (){ - if(m_cellFrom == null || m_cellTo == null) - return false; - return true; + return (m_cellFrom != null && m_cellTo != null && !m_cellFrom.equals(m_cellTo)); } public boolean hasCell (){ -- 2.39.5