You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2022/07/15 21:20:32 UTC
svn commit: r1902751 - /poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java
Author: fanningpj
Date: Fri Jul 15 21:20:32 2022
New Revision: 1902751
URL: http://svn.apache.org/viewvc?rev=1902751&view=rev
Log:
[github-344] refactor equals method in XSSFHyperlinkRecord
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java?rev=1902751&r1=1902750&r2=1902751&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFHyperlinkRecord.java Fri Jul 15 21:20:32 2022
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org