Lines 222-241
Link Here
|
222 |
fileOrFolder(qname, attrs); |
222 |
fileOrFolder(qname, attrs); |
223 |
} else if (qname.equals("file")) { |
223 |
} else if (qname.equals("file")) { |
224 |
MemFileOrFolder mfof = fileOrFolder(qname, attrs); |
224 |
MemFileOrFolder mfof = fileOrFolder(qname, attrs); |
225 |
if (!(mfof instanceof MemFile)) { // a collision between modules |
225 |
if (!(mfof instanceof MemFile)) { |
226 |
throw new ClassCastException("mfof: " + mfof + " stack: " + curr); // NOI18N |
226 |
// a collision between modules |
|
|
227 |
} else { |
228 |
buf.setLength(0); |
229 |
ref = null; |
230 |
String u = attrs.getValue("url"); |
231 |
if (u != null) { |
232 |
try { |
233 |
ref = new URL(base, u); |
234 |
} catch (MalformedURLException mfue) { |
235 |
throw (SAXException) new SAXException(mfue.toString()).initCause(mfue); |
236 |
} |
237 |
} |
238 |
weight = 0; |
227 |
} |
239 |
} |
228 |
buf.setLength(0); |
|
|
229 |
ref = null; |
230 |
String u = attrs.getValue("url"); |
231 |
if (u != null) { |
232 |
try { |
233 |
ref = new URL(base, u); |
234 |
} catch (MalformedURLException mfue) { |
235 |
throw (SAXException) new SAXException(mfue.toString()).initCause(mfue); |
236 |
} |
237 |
} |
238 |
weight = 0; |
239 |
} else if (qname.equals("attr")) { |
240 |
} else if (qname.equals("attr")) { |
240 |
attrCount++; |
241 |
attrCount++; |
241 |
MemAttr attr = new MemAttr(); |
242 |
MemAttr attr = new MemAttr(); |
Lines 341-348
Link Here
|
341 |
} |
342 |
} |
342 |
|
343 |
|
343 |
public void endElement(String ns, String lname, String qname) throws SAXException { |
344 |
public void endElement(String ns, String lname, String qname) throws SAXException { |
344 |
if (qname.equals("file")) { |
345 |
Object poke; |
345 |
MemFile file = (MemFile) curr.peek(); |
346 |
if (qname.equals("file") && (poke = curr.peek()) instanceof MemFile) { |
|
|
347 |
MemFile file = (MemFile) poke; |
346 |
if (weight /* #23609: reversed, so not > */>= file.weight) { |
348 |
if (weight /* #23609: reversed, so not > */>= file.weight) { |
347 |
file.weight = weight; |
349 |
file.weight = weight; |
348 |
file.contents = null; |
350 |
file.contents = null; |