mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-44349 - NPE: GroovyQuoteHandler.hasNonClosedLiteral
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,6 +63,7 @@ public class GroovyQuoteHandler implements MultiCharQuoteHandler {
|
||||
final IElementType tokenType = iterator.getTokenType();
|
||||
if (tokenType == mSTRING_LITERAL || tokenType == mGSTRING_BEGIN || tokenType == mGSTRING_LITERAL || tokenType == mGSTRING_CONTENT) {
|
||||
final Document document = iterator.getDocument();
|
||||
if (document == null) return false;
|
||||
final String literal = document.getText().substring(iterator.getStart(), offset + 1);
|
||||
if ("'''".equals(literal) || "\"\"\"".equals(literal) || "'".equals(literal) || "\"".equals(literal)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user