more bug fixes.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1830 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-01-20 06:50:23 +00:00
1 parent 37a9e0ceae
commit c467e67e46
2 files changed
+10 -6

No files matched your search

+6 -2
View File
@@ -398,7 +398,11 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
}
/**
* Gets the snapshot of all the projects.
* Gets the list of all the projects.
*
* <p>
* Since {@link Project} can only show up under {@link Hudson},
* no need to search recursively.
*/
public List<Project> getProjects() {
return Util.createSubList(items.values(),Project.class);
@@ -1308,7 +1312,7 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
*/
public Set<String> getAllCvsRoots() {
Set<String> r = new TreeSet<String>();
for( Project p : getProjects() ) {
for( AbstractProject p : getAllItems(AbstractProject.class) ) {
SCM scm = p.getScm();
if (scm instanceof CVSSCM) {
CVSSCM cvsscm = (CVSSCM) scm;
+4 -4
View File
@@ -153,10 +153,10 @@ public class User extends AbstractModelObject {
*
* TODO: do we need some index for this?
*/
public List<Build> getBuilds() {
List<Build> r = new ArrayList<Build>();
for (Project p : Hudson.getInstance().getProjects()) {
for (Build b : p.getBuilds()) {
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
for (AbstractProject<?,?> p : Hudson.getInstance().getAllItems(AbstractProject.class)) {
for (AbstractBuild b : p.getBuilds()) {
for (ChangeLogSet.Entry e : b.getChangeSet()) {
if(e.getAuthor()==this) {
r.add(b);