Reuse REST code to list child projects in AdminSetParent
For 'set-project-parent --children-of PROJECT' AdminSetParent needs to list the child projects of PROJECT. To do this use the REST endpoint for listing child projects instead of having an own implementation for computing the child projects in AdminSetParent. Change-Id: Ic557623842f743c440df4bba0dfe713bd7d52ba1 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
committed by
Gerrit Code Review
parent
8a3fb5b120
commit
3d57eadf92
@@ -142,6 +142,13 @@ public class ProjectCacheImpl implements ProjectCache {
|
||||
}
|
||||
}
|
||||
|
||||
/** Invalidate the cached information about the given project. */
|
||||
public void evict(final Project.NameKey p) {
|
||||
if (p != null) {
|
||||
byName.invalidate(p.get());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(final Project p) {
|
||||
listLock.lock();
|
||||
|
||||
Reference in New Issue
Block a user