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 - NPE in FeatureImpl.setJavadocText
Summary: NPE in FeatureImpl.setJavadocText
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-17 14:42 UTC by Jan Pokorsky
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (3.15 KB, text/plain)
2005-01-17 14:44 UTC, Jan Pokorsky
Details

Note You need to log in before you can comment on or make changes to this bug.
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