util: prepare to update to JDOM 2.0 (IDEA-192733)

Some methods in Content's inheritors use covariant return types in JDOM 2.0 so we need to update our implementations.
This commit is contained in:
nik
2018-05-26 11:21:10 +03:00
parent d3dd15c747
commit 782efe9415
3 changed files with 7 additions and 7 deletions
@@ -22,7 +22,7 @@ public class ImmutableCDATA extends CDATA {
@SuppressWarnings("MethodDoesntCallSuperMethod")
@Override
public Text clone() {
public CDATA clone() {
CDATA text = new CDATA();
text.value = value;
return text;
@@ -35,7 +35,7 @@ public class ImmutableCDATA extends CDATA {
//////////////////////////////////////////////////////////////////////////
@Override
public Text setText(String str) {
public CDATA setText(String str) {
throw ImmutableElement.immutableError(this);
}
@@ -50,12 +50,12 @@ public class ImmutableCDATA extends CDATA {
}
@Override
public Content detach() {
public CDATA detach() {
throw ImmutableElement.immutableError(this);
}
@Override
protected Content setParent(Parent parent) {
protected CDATA setParent(Parent parent) {
throw ImmutableElement.immutableError(this);
//return null; // to be able to add this to the other element
}
@@ -304,7 +304,7 @@ class ImmutableElement extends Element {
//////////////////////////////////////////////////////////////////////
@Override
public Content detach() {
public Element detach() {
throw immutableError(this);
}
@Override
@@ -50,12 +50,12 @@ public class ImmutableText extends Text {
}
@Override
public Content detach() {
public Text detach() {
throw ImmutableElement.immutableError(this);
}
@Override
protected Content setParent(Parent parent) {
protected Text setParent(Parent parent) {
throw ImmutableElement.immutableError(this);
//return null; // to be able to add this to the other element
}