|
108 | 108 | } |
109 | 109 |
|
110 | 110 | private static boolean isOld(FlowExecutionOwner owner) throws Exception { |
111 | | - var rootDir = owner.getRootDir(); |
112 | 111 | var factory = SAXParserFactory.newDefaultInstance(); |
113 | 112 | // TODO XMLUtils does not support SAX parsing: |
114 | 113 | factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); |
115 | 114 | factory.setFeature("http://xml.org/sax/features/external-general-entities", false); |
116 | 115 | factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); |
117 | 116 | var parser = factory.newSAXParser(); |
118 | 117 | var old = new AtomicBoolean(); |
119 | | - parser.parse(new File(rootDir, "build.xml"), new DefaultHandler() { |
| 118 | + var buildXml = new File(owner.getRootDir(), "build.xml"); |
| 119 | + parser.parse(buildXml, new DefaultHandler() { |
120 | 120 | @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { |
121 | 121 | var plugin = attributes.getValue("plugin"); |
122 | 122 | if (plugin != null) { |
123 | 123 | int at = plugin.indexOf('@'); |
124 | 124 | if (at != -1 && plugin.substring(0, at).equals("pipeline-model-definition")) { |
125 | 125 | var version = new VersionNumber(plugin.substring(at + 1)); |
126 | | - LOGGER.fine(() -> "got " + version + " off " + qName); |
| 126 | + LOGGER.fine(() -> "got " + version + " off " + qName + " in " + buildXml); |
127 | 127 | if (version.isOlderThan(new VersionNumber("2.2234"))) { |
128 | 128 | old.set(true); |
129 | 129 | } |
|
0 commit comments