@Test public void testEquals() { String repoDirectory = "/src/foo"; RepositoryInfo ri1 = new RepositoryInfo(); ri1.setDirectoryName(new File(repoDirectory)); ri1.setBranch("branch1"); RepositoryInfo ri2 = new RepositoryInfo(); assertNotEquals(ri1, ri2); ri2.setDirectoryName(new File(repoDirectory)); assertEquals(ri1, ri2); }
@Override public boolean equals(Object obj) { if (!(obj instanceof RepositoryInfo)) { return false; } RepositoryInfo ri = (RepositoryInfo) obj; if (ri.getDirectoryNameRelative() != null && this.getDirectoryNameRelative() != null) { return ri.getDirectoryNameRelative().equals(this.getDirectoryNameRelative()); } else { return (ri.getDirectoryNameRelative() == null && this.getDirectoryNameRelative() == null); } }
RepositoryInfo implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof RepositoryInfo)) { return false; } RepositoryInfo ri = (RepositoryInfo) obj; if (ri.getDirectoryNameRelative() != null && this.getDirectoryNameRelative() != null) { return ri.getDirectoryNameRelative().equals(this.getDirectoryNameRelative()); } else { return (ri.getDirectoryNameRelative() == null && this.getDirectoryNameRelative() == null); } } }
RepositoryInfo implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof RepositoryInfo)) { return false; } RepositoryInfo ri = (RepositoryInfo) obj; if (ri.getDirectoryNameRelative() != null && this.getDirectoryNameRelative() != null) { return ri.getDirectoryNameRelative().equals(this.getDirectoryNameRelative()); } else { return (ri.getDirectoryNameRelative() == null && this.getDirectoryNameRelative() == null); } } RepositoryInfo();  RepositoryInfo(RepositoryInfo orig); }
RepositoryInfo implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof RepositoryInfo)) { return false; } RepositoryInfo ri = (RepositoryInfo) obj; if (ri.getDirectoryNameRelative() != null && this.getDirectoryNameRelative() != null) { return ri.getDirectoryNameRelative().equals(this.getDirectoryNameRelative()); } else { return (ri.getDirectoryNameRelative() == null && this.getDirectoryNameRelative() == null); } } RepositoryInfo();  RepositoryInfo(RepositoryInfo orig); boolean isHandleRenamedFiles(); void setHandleRenamedFiles(boolean flag); boolean isHistoryEnabled(); void setHistoryEnabled(boolean flag); String getDirectoryNameRelative(); void setDirectoryNameRelative(String dir); String getDirectoryName(); void setDirectoryName(File dir); boolean isWorking(); void setWorking(Boolean working); boolean isRemote(); void setRemote(boolean remote); String getType(); void setType(String type); String getParent(); void setParent(String parent); void setDatePatterns(String[] datePatterns); String[] getDatePatterns(); String getBranch(); void setBranch(String branch); String getCurrentVersion(); void setCurrentVersion(String currentVersion); void fillFromProject(); @Override boolean equals(Object obj); @Override int hashCode(); }
RepositoryInfo implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof RepositoryInfo)) { return false; } RepositoryInfo ri = (RepositoryInfo) obj; if (ri.getDirectoryNameRelative() != null && this.getDirectoryNameRelative() != null) { return ri.getDirectoryNameRelative().equals(this.getDirectoryNameRelative()); } else { return (ri.getDirectoryNameRelative() == null && this.getDirectoryNameRelative() == null); } } RepositoryInfo();  RepositoryInfo(RepositoryInfo orig); boolean isHandleRenamedFiles(); void setHandleRenamedFiles(boolean flag); boolean isHistoryEnabled(); void setHistoryEnabled(boolean flag); String getDirectoryNameRelative(); void setDirectoryNameRelative(String dir); String getDirectoryName(); void setDirectoryName(File dir); boolean isWorking(); void setWorking(Boolean working); boolean isRemote(); void setRemote(boolean remote); String getType(); void setType(String type); String getParent(); void setParent(String parent); void setDatePatterns(String[] datePatterns); String[] getDatePatterns(); String getBranch(); void setBranch(String branch); String getCurrentVersion(); void setCurrentVersion(String currentVersion); void fillFromProject(); @Override boolean equals(Object obj); @Override int hashCode();  }