File tree Expand file tree Collapse file tree
src/main/java/com/ss/editor/ui/control/code Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import com .ss .editor .util .GLSLType ;
55import org .fxmisc .richtext .model .StyleSpans ;
66import org .jetbrains .annotations .NotNull ;
7+ import org .jetbrains .annotations .Nullable ;
78
89import java .util .ArrayList ;
910import java .util .Arrays ;
@@ -45,7 +46,7 @@ public class GLSLCodeArea extends BaseCodeArea {
4546 /**
4647 * The available fields.
4748 */
48- @ NotNull
49+ @ Nullable
4950 private final List <String > fields ;
5051
5152 /**
@@ -65,7 +66,7 @@ public GLSLCodeArea() {
6566 * @return available fields.
6667 */
6768 @ FXThread
68- private @ NotNull List <String > getFields () {
69+ private @ Nullable List <String > getFields () {
6970 return fields ;
7071 }
7172
@@ -81,7 +82,7 @@ public GLSLCodeArea() {
8182 "|(?<" + CLASS_VALUE_TYPE + ">" + VALUE_TYPE_PATTERN + ")" ;
8283
8384 final List <String > fields = getFields ();
84- if (!fields .isEmpty ()) {
85+ if (fields != null && !fields .isEmpty ()) {
8586 result += "|(?<" + CLASS_VALUE_VALUE + ">" + "\\ b(" + String .join ("|" , fields ) + ")\\ b" ;
8687 }
8788
You can’t perform that action at this time.
0 commit comments