mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix problem with unexpected null value (following fix for IDEA-154578)
This commit is contained in:
+3
-2
@@ -332,8 +332,9 @@ class DocumentFoldingInfo implements JDOMExternalizable, CodeFoldingState {
|
||||
if (start < 0 || end >= document.getTextLength() || start > end) continue;
|
||||
RangeMarker marker = document.createRangeMarker(start, end);
|
||||
myRangeMarkers.add(marker);
|
||||
String placeHolderText = StringUtil.unescapeIllegalXmlChars(e.getAttributeValue(PLACEHOLDER_ATT));
|
||||
if (placeHolderText == null) placeHolderText = DEFAULT_PLACEHOLDER;
|
||||
String placeholderAttributeValue = e.getAttributeValue(PLACEHOLDER_ATT);
|
||||
String placeHolderText = placeholderAttributeValue == null ? DEFAULT_PLACEHOLDER
|
||||
: StringUtil.unescapeIllegalXmlChars(placeholderAttributeValue);
|
||||
FoldingInfo fi = new FoldingInfo(placeHolderText, expanded);
|
||||
marker.putUserData(FOLDING_INFO_KEY, fi);
|
||||
}
|
||||
|
||||
@@ -2203,6 +2203,7 @@ public class StringUtil extends StringUtilRt {
|
||||
* @see <a href="https://www.w3.org/International/questions/qa-controls">https://www.w3.org/International/questions/qa-controls</a>
|
||||
* @see Verifier#isXMLCharacter(int)
|
||||
*/
|
||||
@NotNull
|
||||
public static String escapeIllegalXmlChars(@NotNull String text) {
|
||||
StringBuilder b = null;
|
||||
int lastPos = 0;
|
||||
@@ -2226,6 +2227,7 @@ public class StringUtil extends StringUtilRt {
|
||||
/**
|
||||
* @see #escapeIllegalXmlChars(String)
|
||||
*/
|
||||
@NotNull
|
||||
public static String unescapeIllegalXmlChars(@NotNull String text) {
|
||||
StringBuilder b = null;
|
||||
int lastPos = 0;
|
||||
|
||||
Reference in New Issue
Block a user