mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Inspections - avoid IOOBE on bad range
This commit is contained in:
@@ -132,7 +132,8 @@ public class ProblemDescriptionNode extends InspectionTreeNode {
|
||||
final TextRange elementRange = psiElement.getTextRange();
|
||||
if (textRange!=null && elementRange!=null) {
|
||||
textRange = textRange.shiftRight(-elementRange.getStartOffset());
|
||||
ref = textRange.substring(ref);
|
||||
if(textRange.getStartOffset() < 0 && textRange.getEndOffset()<ref.length())
|
||||
ref = textRange.substring(ref);
|
||||
}
|
||||
}
|
||||
return ref;
|
||||
|
||||
Reference in New Issue
Block a user