Remove support for queue.txt format (replaced by XML in 2009)
@@ -389,21 +389,8 @@ public class Queue extends ResourceController implements Saveable {
blockedProjects.clear();
buildables.clear();
pendings.clear();
- // first try the old format
- File queueFile = getQueueFile();
- if (queueFile.exists()) {
- try (BufferedReader in = Files.newBufferedReader(Util.fileToPath(queueFile), Charset.defaultCharset())) {
- String line;
- while ((line = in.readLine()) != null) {
- AbstractProject j = Jenkins.get().getItemByFullName(line, AbstractProject.class);
- if (j != null)
- j.scheduleBuild();
- }
- }
- // discard the queue file now that we are done
- queueFile.delete();
- } else {
- queueFile = getXMLQueueFile();
+
+ File queueFile = getXMLQueueFile();
if (queueFile.exists()) {
Object unmarshaledObj = new XmlFile(XSTREAM, queueFile).read();
List items;
@@ -457,7 +444,6 @@ public class Queue extends ResourceController implements Saveable {
queueFile.renameTo(bk);
queueFile.delete();
}
- }
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Failed to load the queue file " + getXMLQueueFile(), e);
} finally { updateSnapshot(); } } finally {
@@ -517,10 +503,6 @@ public class Queue extends ResourceController implements Saveable {
scheduleMaintenance();
}
- private File getQueueFile() {
- return new File(Jenkins.get().getRootDir(), "queue.txt");
- }
-
/*package*/ File getXMLQueueFile() {
return new File(Jenkins.get().getRootDir(), "queue.xml");
}
