Rename ChangeNotes.Factory#createForNew to createForBatchUpdate
BatchUpdate is the only caller, and it isn't always creating a new change (though sometimes it is). An inline comment already describes why it needs to use a preloaded change. Change-Id: I18d8d9c38902461e958fa609a311539014e69ed5
This commit is contained in:
		@@ -855,7 +855,7 @@ public class BatchUpdate implements AutoCloseable {
 | 
				
			|||||||
      // Pass in preloaded change to controlFor, to avoid:
 | 
					      // Pass in preloaded change to controlFor, to avoid:
 | 
				
			||||||
      //  - reading from a db that does not belong to this update
 | 
					      //  - reading from a db that does not belong to this update
 | 
				
			||||||
      //  - attempting to read a change that doesn't exist yet
 | 
					      //  - attempting to read a change that doesn't exist yet
 | 
				
			||||||
      ChangeNotes notes = changeNotesFactory.createForNew(c);
 | 
					      ChangeNotes notes = changeNotesFactory.createForBatchUpdate(c);
 | 
				
			||||||
      ChangeControl ctl = changeControlFactory.controlFor(notes, user);
 | 
					      ChangeControl ctl = changeControlFactory.controlFor(notes, user);
 | 
				
			||||||
      return new ChangeContext(ctl, new BatchUpdateReviewDb(db), repo, rw);
 | 
					      return new ChangeContext(ctl, new BatchUpdateReviewDb(db), repo, rw);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -185,7 +185,7 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
 | 
				
			|||||||
      return new ChangeNotes(args, change);
 | 
					      return new ChangeNotes(args, change);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public ChangeNotes createForNew(Change change) throws OrmException {
 | 
					    public ChangeNotes createForBatchUpdate(Change change) throws OrmException {
 | 
				
			||||||
      return new ChangeNotes(args, change).load();
 | 
					      return new ChangeNotes(args, change).load();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user