This is an automated email from the ASF dual-hosted git repository.

mbien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new b332edd0f7 PHP: Fixes the NPE error that occurs when you change the 
existing visibility declaration of a class property or method when you press 
Enter or click it in the autocomplete list.
     new 28cffca195 Merge pull request #4670 from 
troizet/fix_npe_php_visibility_autocomplete
b332edd0f7 is described below

commit b332edd0f7a8f3ce8b9f2cc45592681bf1371e3c
Author: Alexey Borokhvostov <troi...@gmail.com>
AuthorDate: Wed Sep 21 22:52:28 2022 +0700

    PHP: Fixes the NPE error that occurs when you change the existing 
visibility declaration of a class property or method when you press Enter or 
click it in the autocomplete list.
---
 .../netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
 
b/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
index cb15ca4b36..5d7f36ca01 100644
--- 
a/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
+++ 
b/ide/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateInsertHandler.java
@@ -515,7 +515,7 @@ public final class CodeTemplateInsertHandler implements 
TextRegionManagerListene
             return false;
         }
         TextSync last = removed.get(removed.size()-1).activeTextSync();
-        return last.isCaretMarker() && last.isCompletionInvoke();
+        return last != null && last.isCaretMarker() && 
last.isCompletionInvoke();
     }
 
     void release() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to