@Test(expected=NullPointerException.class) public void changeCorrectedObject_NullNewObject() { correctionList.changeCorrectedObject(judgeJanNowak, null); }
public void changeCorrectedObject(DataObject oldObject, DataObject newObject) { Preconditions.checkNotNull(oldObject); Preconditions.checkNotNull(newObject); Preconditions.checkArgument(oldObject.getClass().equals(newObject.getClass())); for (ImportCorrection importCorrection : importCorrections) { if (importCorrection.getCorrectedObject() == oldObject) { importCorrection.setCorrectedObject(newObject); } } }
ImportCorrectionList { public void changeCorrectedObject(DataObject oldObject, DataObject newObject) { Preconditions.checkNotNull(oldObject); Preconditions.checkNotNull(newObject); Preconditions.checkArgument(oldObject.getClass().equals(newObject.getClass())); for (ImportCorrection importCorrection : importCorrections) { if (importCorrection.getCorrectedObject() == oldObject) { importCorrection.setCorrectedObject(newObject); } } } }
ImportCorrectionList { public void changeCorrectedObject(DataObject oldObject, DataObject newObject) { Preconditions.checkNotNull(oldObject); Preconditions.checkNotNull(newObject); Preconditions.checkArgument(oldObject.getClass().equals(newObject.getClass())); for (ImportCorrection importCorrection : importCorrections) { if (importCorrection.getCorrectedObject() == oldObject) { importCorrection.setCorrectedObject(newObject); } } }  }
ImportCorrectionList { public void changeCorrectedObject(DataObject oldObject, DataObject newObject) { Preconditions.checkNotNull(oldObject); Preconditions.checkNotNull(newObject); Preconditions.checkArgument(oldObject.getClass().equals(newObject.getClass())); for (ImportCorrection importCorrection : importCorrections) { if (importCorrection.getCorrectedObject() == oldObject) { importCorrection.setCorrectedObject(newObject); } } }  void addCorrection(ImportCorrection importCorrection); void changeCorrectedObject(DataObject oldObject, DataObject newObject); int getNumberOfCorrections(); boolean hasImportCorrection(ImportCorrection importCorrection); List<ImportCorrection> getImportCorrections(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
ImportCorrectionList { public void changeCorrectedObject(DataObject oldObject, DataObject newObject) { Preconditions.checkNotNull(oldObject); Preconditions.checkNotNull(newObject); Preconditions.checkArgument(oldObject.getClass().equals(newObject.getClass())); for (ImportCorrection importCorrection : importCorrections) { if (importCorrection.getCorrectedObject() == oldObject) { importCorrection.setCorrectedObject(newObject); } } }  void addCorrection(ImportCorrection importCorrection); void changeCorrectedObject(DataObject oldObject, DataObject newObject); int getNumberOfCorrections(); boolean hasImportCorrection(ImportCorrection importCorrection); List<ImportCorrection> getImportCorrections(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); public List<ImportCorrection> importCorrections; }