mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user