aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-15 21:20:32 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-15 21:20:32 +0000
commit30b20e3967a52a9b9aece72caabdb0e6251919d9 (patch)
treea08729314e8905490d21c4d70c672456e6336742 /poi-ooxml
parent6e34a3cebea926c356866502c81a7c17fbeb40f8 (diff)
downloadpoi-30b20e3967a52a9b9aece72caabdb0e6251919d9.tar.gz
poi-30b20e3967a52a9b9aece72caabdb0e6251919d9.zip
[github-344] refactor equals method in XSSFHyperlinkRecord
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java
index 080048af45..611903ddff 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java
@@ -89,17 +89,16 @@ public class XSSFHyperlinkRecord {
XSSFHyperlinkRecord that = (XSSFHyperlinkRecord) o;
- if (cellRangeAddress != null ? !cellRangeAddress.equals(that.cellRangeAddress) : that.cellRangeAddress != null)
- return false;
- if (relId != null ? !relId.equals(that.relId) : that.relId != null) return false;
- if (location != null ? !location.equals(that.location) : that.location != null) return false;
- if (toolTip != null ? !toolTip.equals(that.toolTip) : that.toolTip != null) return false;
- return display != null ? display.equals(that.display) : that.display == null;
+ return Objects.equals(cellRangeAddress, that.cellRangeAddress) &&
+ Objects.equals(relId, that.relId) &&
+ Objects.equals(location, that.location) &&
+ Objects.equals(toolTip, that.toolTip) &&
+ Objects.equals(display, that.display);
}
@Override
public int hashCode() {
- return Objects.hash(cellRangeAddress,relId,location,toolTip,display);
+ return Objects.hash(cellRangeAddress, relId, location, toolTip, display);
}
@Override