jenkinsci/jenkins — pull request #761 by lvotypko (2013-04-17 07:07:46+00:00)
Title: Queue should keep consistence in pendings 

During bug which is corrected here https://github.com/jenkinsci/jenkins/pull/730 I catch another bad behaviour. If the exception is thrown after item is added into pendings and before slave takes it, the item stuck in pendings forever.

Example with label bug: method maintain was item with quoted label. During cycle another(previous item in buildables list) item was added into pending and should be taken, but next item with quoted label cause ClassCastException. In method pop was abort job offer but item stays in the pendings.