#628 Intention Add method to the bean interface

Intention "Add method to the bean interface" when applied to the
container-managed field, i.e. public abstract get/set method, still throws
this exception:

ERROR - com.intellij.command.b.b -
ERROR - com.intellij.command.b.b - IntelliJ IDEA (Ariadna)
3.0
Build #628
ERROR - com.intellij.command.b.b - JDK: 1.3.1_03
ERROR - com.intellij.command.b.b - VM: Java HotSpot(TM)
Client
VM
ERROR - com.intellij.command.b.b - Vendor: Sun Microsystems
Inc
..
ERROR - com.intellij.command.b.b - OS: Windows 2000
ERROR - com.intellij.command.b.b -
java.lang.NullPointerException
at com.intellij.codeInsight.b.bf.a(bf.java:115)
at com.intellij.codeInsight.b.bf.b(bf.java:96)
at com.intellij.codeInsight.b.bn.run(bn.java:6)
at com.intellij.openapi.application.a.d.runWriteAction(d.java:251)
at com.intellij.codeInsight.b.bm.run(bm.java:2)
at com.intellij.command.b.b.a(b.java:53)
at com.intellij.codeInsight.b.bl.run(bl.java:3)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:149)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:332)
at com.intellij.ide.p.a(p.java:13)
at com.intellij.ide.p.dispatchEvent(p.java:7)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:126)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:93)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

/kesh


2 comments
Comment actions Permalink

It is not completely fixed. Like if you try to perform this intention on the
read-only EJB implementation class
IDEA will add the declaration of your CMP method to the bean interface, but
at the same time it will try to mark this implementation class as modified.
This follows by internal assertion:

ERROR - com.intellij.codeEditor.b.a -
ERROR - com.intellij.codeEditor.b.a - IntelliJ IDEA (Ariadna)
3.0
Build #629
ERROR - com.intellij.codeEditor.b.a - JDK: 1.3.1_03
ERROR - com.intellij.codeEditor.b.a - VM: Java HotSpot(TM)
Client
VM
ERROR - com.intellij.codeEditor.b.a - Vendor: Sun Microsystems
Inc
..
ERROR - com.intellij.codeEditor.b.a - OS: Windows 2000
ERROR - com.intellij.codeEditor.b.a -
com.intellij.util.o: Cannot modify a read-only file
C:\project\src\impl\TrackingPBean.java.
at com.intellij.psi.f.i.a(i.java:3)
at com.intellij.psi.f.e.b.a.a(a.java:114)
at com.intellij.codeEditor.b.d.run(d.java:7)
at com.intellij.openapi.application.a.d.runWriteAction(d.java:54)
at com.intellij.codeEditor.b.a.a(a.java:39)
at com.intellij.codeEditor.b.a.a(a.java:20)
at com.intellij.codeInsight.f.a.m.run(m.java:8)
at com.intellij.util.r.run(r.java:8)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:149)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:332)
at com.intellij.ide.p.a(p.java:43)
at com.intellij.ide.p.dispatchEvent(p.java:54)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:126)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:93)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

Look also at the attached picture.

/kesh

"Alexey Kudravtsev" <cdr@intellij.com> wrote in message
news:adf8fk$p8t$1@is.intellij.net...

Hello kesh,
You are right, when you follows intention "Add method to bean interface"

for

abstract methods in EJB implementation (excluding CMR/CMP fields declared

in

ejb-jar), you gets NPE.
It will be fixed in #629.
Thank you for report.

>
>

--
regards,
Alexey Kudravtsev.
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"kesh" <kesha@cosite.com> wrote in message
news:ad8i6p$et3$1@is.intellij.net...

Intention "Add method to the bean interface" when applied to the
container-managed field, i.e. public abstract get/set method, still

throws

this exception:

>

ERROR - com.intellij.command.b.b -
ERROR - com.intellij.command.b.b - IntelliJ IDEA

(Ariadna)

3.0
Build #628
ERROR - com.intellij.command.b.b - JDK: 1.3.1_03
ERROR - com.intellij.command.b.b - VM: Java HotSpot(TM)
Client
VM
ERROR - com.intellij.command.b.b - Vendor: Sun

Microsystems

Inc
.
ERROR - com.intellij.command.b.b - OS: Windows 2000
ERROR - com.intellij.command.b.b -
java.lang.NullPointerException
at com.intellij.codeInsight.b.bf.a(bf.java:115)
at com.intellij.codeInsight.b.bf.b(bf.java:96)
at com.intellij.codeInsight.b.bn.run(bn.java:6)
at

com.intellij.openapi.application.a.d.runWriteAction(d.java:251)

at com.intellij.codeInsight.b.bm.run(bm.java:2)
at com.intellij.command.b.b.a(b.java:53)
at com.intellij.codeInsight.b.bl.run(bl.java:3)
at

java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:149)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:332)
at com.intellij.ide.p.a(p.java:13)
at com.intellij.ide.p.dispatchEvent(p.java:7)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:126)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:93)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

>

/kesh

>
>

>
>




0
Comment actions Permalink

Hello kesh,
Readonly files bug will be fixed in #630.
Thanks once again for your report!

--
regards,
Alexey Kudravtsev.
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"kesh" <kesha@cosite.com> wrote in message
news:adgi34$p64$1@is.intellij.net...

It is not completely fixed. Like if you try to perform this intention on

the

read-only EJB implementation class
IDEA will add the declaration of your CMP method to the bean interface,

but

at the same time it will try to mark this implementation class as

modified.

This follows by internal assertion:

>

ERROR - com.intellij.codeEditor.b.a -
ERROR - com.intellij.codeEditor.b.a - IntelliJ IDEA

(Ariadna)

3.0
Build #629
ERROR - com.intellij.codeEditor.b.a - JDK: 1.3.1_03
ERROR - com.intellij.codeEditor.b.a - VM: Java HotSpot(TM)
Client
VM
ERROR - com.intellij.codeEditor.b.a - Vendor: Sun

Microsystems

Inc
.
ERROR - com.intellij.codeEditor.b.a - OS: Windows 2000
ERROR - com.intellij.codeEditor.b.a -
com.intellij.util.o: Cannot modify a read-only file
C:\project\src\impl\TrackingPBean.java.
at com.intellij.psi.f.i.a(i.java:3)
at com.intellij.psi.f.e.b.a.a(a.java:114)
at com.intellij.codeEditor.b.d.run(d.java:7)
at com.intellij.openapi.application.a.d.runWriteAction(d.java:54)
at com.intellij.codeEditor.b.a.a(a.java:39)
at com.intellij.codeEditor.b.a.a(a.java:20)
at com.intellij.codeInsight.f.a.m.run(m.java:8)
at com.intellij.util.r.run(r.java:8)
at

java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:149)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:332)
at com.intellij.ide.p.a(p.java:43)
at com.intellij.ide.p.dispatchEvent(p.java:54)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:126)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:93)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

>

Look also at the attached picture.

>

/kesh

>



0

Please sign in to leave a comment.