casting the toArray result will sometimes cause ClassCastExceptions.
i.e.:
Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
at hudson.security.WhoAmI.getAuthorities(WhoAmI.java:65)
Revert "menu needs to be explicitly inherited"
This reverts commit 7add578b8d.
Revert "Push Maven site to another repository"
This reverts commit 71d8014b52.
The following bug report from olamy made me look hard at the code, but I'm not spotting an obvious problem.
The binary search algorithm here seems to always satisfy the invariant of 0<=lo<=pivot<=hi<=size, so I can't understand how lo==size+1 at the end, for this to happen.
So the only thing I can think of is concurrency related, which is indeed buggy --- we are editing indices after they are set to instance fields, which violates the copy-on-write semantics. This commit fixes that.
Sep 21, 2012 9:38:35 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading job MahoutQM
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at jenkins.model.lazy.SortedList.get(SortedList.java:60)
at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:381)
at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:243)
at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:998)
at hudson.maven.AbstractMavenProject.createTransientActions(AbstractMavenProject.java:184)
at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:665)
at hudson.maven.MavenModule.updateTransientActions(MavenModule.java:411)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:299)
at hudson.maven.MavenModule.onLoad(MavenModule.java:236)
at hudson.model.Items.load(Items.java:221)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:99)