NullPointer when try to read property
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
play framework | Status tracked in 1.0 | |||||
1.0 |
Fix Released
|
Undecided
|
Unassigned | |||
1.1 |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Using play-1.0.1
When I try to read a property of an object I've got a NullPointerExce
The object is not part of my model.
Just try this code in a new play application. :
-------
import java.awt.Point;
public class Application extends Controller {
public static void index() {
Point p = new Point();
p.x=5;
System.
render();
}
}
-------
It fires an exception :
play.exceptions
at play.mvc.
at Invocation.HTTP Request(Play!)
Caused by: java.lang.
at play.classloadi
at controllers.
at play.utils.
at play.mvc.
... 1 more
-------
Did I miss something ?
Ah yes. I've already fixed that in the trunk. Please check with the
latest 1.0 nightly
On 12 févr. 2010, at 11:53, all <email address hidden> wrote:
> Public bug reported: ption. ------- ------- ------- ------- ------- ------- ------- ------- ------ out.println( p.x); ------- ------- ------- ------- ------- ------- ------- ------- ---- .JavaExecutionE xception ActionInvoker. invoke( ActionInvoker. java:229) NullPointerExce ption ng.enhancers. PropertiesEnhan cer invokeReadPrope rty(PropertiesE nhancer. java:171) Application. index(Applicati on.java: 14) Java.invokeStat ic(Java. java:129) ActionInvoker. invoke( ActionInvoker. java:138) ------- ------- ------- ------- ------- ------- ------- ------ /bugs.launchpad .net/bugs/ 520910
>
> Using play-1.0.1
>
> When I try to read a property of an object I've got a
> NullPointerExce
>
> The object is not part of my model.
>
> Just try this code in a new play application. :
>
> -------
>
> import java.awt.Point;
>
> public class Application extends Controller {
>
> public static void index() {
> Point p = new Point();
> p.x=5;
> System.
> render();
> }
>
> }
>
> -------
>
> It fires an exception :
>
> play.exceptions
> at play.mvc.
> at Invocation.HTTP Request(Play!)
> Caused by: java.lang.
> at play.classloadi
> $FieldAccessor.
> at controllers.
> at play.utils.
> at play.mvc.
> ... 1 more
>
> -------
>
> Did I miss something ?
>
> ** Affects: play
> Importance: Undecided
> Status: New
>
> --
> NullPointer when try to read property
> https:/
> You received this bug notification because you are subscribed to play
> framework.