This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216058 - NullPointerException at org.netbeans.modules.php.editor.PHPCompletionItem$MethodDeclarationItem.getNameAndFunctionBodyForTemplate
Summary: NullPointerException at org.netbeans.modules.php.editor.PHPCompletionItem$Met...
Status: RESOLVED DUPLICATE of bug 214439
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-27 12:16 UTC by Exceptions Reporter
Modified: 2012-07-30 07:54 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 191088


Attachments
stacktrace (743 bytes, text/plain)
2012-07-27 12:16 UTC, Exceptions Reporter
Details
stacktrace (743 bytes, text/plain)
2012-07-27 20:12 UTC, joao_neto
Details
stacktrace (743 bytes, text/plain)
2012-07-30 07:54 UTC, jthoorens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-07-27 12:16:07 UTC
This bug was originally marked as duplicate of bug 214439, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.2 (Build 201207171143)
VM: OpenJDK 64-Bit Server VM, 22.0-b10, OpenJDK Runtime Environment, 1.7.0_03-b147
OS: Linux

User Comments:
jakemonO: trying to use the netbeans hint to autogenerate a method looksw to be bug 214439

tmysik: invoke hint for generating missing method

GUEST: When click "create method in Class" in hint dialog.

web82: Trying to create a method with a hint (alt+enter).

Calling a method that does not exixts from another method generates a hint, but choosing "create method..." throws this exception.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.php.editor.PHPCompletionItem$MethodDeclarationItem.getNameAndFunctionBodyForTemplate(PHPCompletionItem.java:853)
   at org.netbeans.modules.php.editor.PHPCompletionItem$MethodDeclarationItem.getCustomInsertTemplate(PHPCompletionItem.java:847)
   at org.netbeans.modules.php.editor.verification.IntroduceHint$IntroduceMethodFix.implement(IntroduceHint.java:463)
   at org.netbeans.modules.csl.hints.infrastructure.FixWrapper.implement(FixWrapper.java:66)
   at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:788)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)
Comment 1 Exceptions Reporter 2012-07-27 12:16:10 UTC
Created attachment 122459 [details]
stacktrace
Comment 2 Ondrej Brejla 2012-07-27 12:39:03 UTC

*** This bug has been marked as a duplicate of bug 214439 ***
Comment 3 joao_neto 2012-07-27 20:12:33 UTC
Created attachment 122476 [details]
stacktrace

Hello....
This issue ocurred after i write a class method:

class A {
public function functionName() {
   $this->_otherMethod(); //the tip is: Create a method on A class but if i click to create the method a excepction is raised
}
}
Comment 4 jthoorens 2012-07-30 07:54:33 UTC
Created attachment 122518 [details]
stacktrace

I accepted the hint of creating a non existing method in a PHP class and nothing happened except a small error message at the bottom of the scree.