mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[workspace model] IJPL-1113 Handle IllegalNameException from XML reading
GitOrigin-RevId: 0159ed2cd99655d448d499c3134889402751a1ee
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6122138a6b
commit
0040e3f019
@@ -339,6 +339,15 @@ internal class JDOMUtilTest {
|
|||||||
JDOMUtil.load(testRoot)
|
JDOMUtil.load(testRoot)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = JDOMException::class)
|
||||||
|
fun `handling of IllegalNameException for unsupported symbol`() {
|
||||||
|
JDOMUtil.load("<settings xmlns=\"\n" +
|
||||||
|
"http://maven.apache.org/SETTINGS/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
|
||||||
|
" xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd\">\n" +
|
||||||
|
" <localRepository/>\n" +
|
||||||
|
"</settings>")
|
||||||
|
}
|
||||||
|
|
||||||
private fun assertElementText(actual: Element, expected: String) {
|
private fun assertElementText(actual: Element, expected: String) {
|
||||||
assertThat(JDOMUtil.writeElement(actual)).isEqualTo(expected)
|
assertThat(JDOMUtil.writeElement(actual)).isEqualTo(expected)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public final class JDOMUtil {
|
|||||||
xmlStreamReader.close();
|
xmlStreamReader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (XMLStreamException | UncheckedStreamException e) {
|
catch (XMLStreamException | UncheckedStreamException | IllegalNameException e) {
|
||||||
throw new JDOMException(e.getMessage(), e);
|
throw new JDOMException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
@@ -235,7 +235,7 @@ public final class JDOMUtil {
|
|||||||
xmlStreamReader.close();
|
xmlStreamReader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (XMLStreamException | UncheckedStreamException e) {
|
catch (XMLStreamException | UncheckedStreamException | IllegalNameException e) {
|
||||||
throw new JDOMException(e.getMessage(), e);
|
throw new JDOMException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,7 +290,7 @@ public final class JDOMUtil {
|
|||||||
xmlStreamReader.close();
|
xmlStreamReader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (XMLStreamException | UncheckedStreamException e) {
|
catch (XMLStreamException | UncheckedStreamException | IllegalNameException e) {
|
||||||
throw new JDOMException(e.getMessage(), e);
|
throw new JDOMException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,7 +310,7 @@ public final class JDOMUtil {
|
|||||||
xmlStreamReader.close();
|
xmlStreamReader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (XMLStreamException | UncheckedStreamException e) {
|
catch (XMLStreamException | UncheckedStreamException | IllegalNameException e) {
|
||||||
throw new JDOMException(e.getMessage(), e);
|
throw new JDOMException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user