Comment 1 for bug 520910

Revision history for this message
Guillaume Bort (guillaume-bort) wrote : Re: [Bug 520910] [NEW] NullPointer when try to read property

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:
>
> Using play-1.0.1
>
> When I try to read a property of an object I've got a
> NullPointerException.
>
> 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.out.println(p.x);
> render();
> }
>
> }
>
> -------------------------------------------------------------------
>
> It fires an exception :
>
> play.exceptions.JavaExecutionException
> at play.mvc.ActionInvoker.invoke(ActionInvoker.java:229)
> at Invocation.HTTP Request(Play!)
> Caused by: java.lang.NullPointerException
> at play.classloading.enhancers.PropertiesEnhancer
> $FieldAccessor.invokeReadProperty(PropertiesEnhancer.java:171)
> at controllers.Application.index(Application.java:14)
> at play.utils.Java.invokeStatic(Java.java:129)
> at play.mvc.ActionInvoker.invoke(ActionInvoker.java:138)
> ... 1 more
>
> --------------------------------------------------------------
>
> Did I miss something ?
>
> ** Affects: play
> Importance: Undecided
> Status: New
>
> --
> NullPointer when try to read property
> https://bugs.launchpad.net/bugs/520910
> You received this bug notification because you are subscribed to play
> framework.