Avoid opening extra ReviewDb connection in PatchSetInfoFactory
Every caller already had a ReviewDb "handy". Rather than making a new connection, use the existing one from the caller to read records about the patch set from the database. Change-Id: I68de1aa293f81b4318d681851706556bb73a5fd7
This commit is contained in:
@@ -136,7 +136,7 @@ public abstract class ChangeEmail extends OutgoingEmail {
|
||||
|
||||
if (patchSet != null && patchSetInfo == null) {
|
||||
try {
|
||||
patchSetInfo = args.patchSetInfoFactory.get(patchSet.getId());
|
||||
patchSetInfo = args.patchSetInfoFactory.get(args.db.get(), patchSet.getId());
|
||||
} catch (PatchSetInfoNotAvailableException err) {
|
||||
patchSetInfo = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user