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 53514

Summary: NPE in FeatureImpl.setJavadocText
Product: java Reporter: Jan Pokorsky <jpokorsky>
Component: UnsupportedAssignee: Martin Matula <mmatula>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: NPE

Description Jan Pokorsky 2005-01-17 14:42:16 UTC
Here is a code snipped that is involved:

JavaClass declaringClass = getDeclaringClass();
JavaModelPackage jmodel =
JavaMetamodel.getManager().getJavaExtent(declaringClass);
Method newGetter = jmodel.getMethod().createMethod();

String namePrefix = JMIUtils.isPrimitiveType(type,
PrimitiveTypeKindEnum.BOOLEAN) ? "is" : "get";
newGetter.setName( namePrefix +
capitalizeFirstLetter( getName() ) );
newGetter.setType( type );
newGetter.setModifiers( Modifier.PUBLIC );
Parameter param =
jmodel.getParameter().createParameter();
param.setName(name);
param.setType(type);
newSetter.getParameters().add(param);

String comment = "Setter for property a.\n@param a
New value of property a.\n";
newGetter.setJavadocText( comment );
Comment 1 Jan Pokorsky 2005-01-17 14:44:17 UTC
Created attachment 19729 [details]
NPE
Comment 2 Martin Matula 2005-01-17 15:00:21 UTC
Fixed.

Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/FeatureImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/FeatureImpl.java,v
 <--  FeatureImpl.java
new revision: 1.29; previous revision: 1.28
done
Comment 3 Jan Pokorsky 2005-01-17 15:05:05 UTC
Verified.
Comment 4 Quality Engineering 2007-09-20 09:57:32 UTC
Reorganization of java component