Skip to content

Simplify .equals code #214

Open
Open
@thewheat

Description

@thewheat

Current code utilises the following format to check for object equality in .equals methods e.g.

if (website != null ? !website.equals(company.website) : company.website != null) return false;

This is hard to read and could be simplified

Possible solution:

if (!Objects.equals(website, company.website)) return false;

image

Raised in https://github.com/intercom/intercom-java/pull/183/files#r206175113

Till need to discuss the possibility of adding and enforcing Java 7 minimum version if we were to implement this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions