You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Martin Hesse <mw...@gmail.com> on 2018/02/01 03:23:09 UTC
NPE on Debug logging in ScalarModelWithPending.java
Hi,
Don't know if this qualifies as Heisenbug [0], since debugging and debug
logging are not the same thing, but this NPE seems to only show when I
switch logging to DEBUG. Using 1.16.0. Didn't go further into it.
Caused by:
java.lang.NullPointerException
org.apache.isis.viewer.wicket.model.models.ScalarModelWithPending$Util$1#setObject(ScalarModelWithPending.java:75)
-- ScalarModelWithPending.java lines 74-76 --
if (LOG.isDebugEnabled()) {
LOG.debug("setting to: " +
adapterMemento!=null?adapterMemento.toString():null);
}
Thanks and regards
Martin
[0] https://en.wikipedia.org/wiki/Heisenbug
Re: NPE on Debug logging in ScalarModelWithPending.java
Posted by Martin Hesse <mw...@gmail.com>.
Got me curious too, String concatenation beats equality. The explicit
parentheses leading to an NPE would be here, whereupon it becomes
immediately visible.
System.out.println(("setting to: " + adapterMemento) != null ?
adapterMemento.toString() : null);
Thanks!
On Thu, Feb 1, 2018 at 2:12 PM, Andreas Huber <a....@corax.at> wrote:
> Will be solved with release 1.16.1.
> Issue: ISIS-1858 [1]
>
> Thanks again!
>
> [1] https://issues.apache.org/jira/browse/ISIS-1858
>
> On 2018/02/01 06:55:51, Andreas Huber <a....@corax.at> wrote:
> > Hi Martin,>
> >
> > thanks for this nice little Java puzzler. It got me curious and I had to>
> > lookup Java operator precedence to solve this one, we need parentheses!>
> >
> > Cheers!>
> >
> > On 2018/02/01 03:23:09, Martin Hesse <m....@gmail.com> wrote:>
> > > Hi,>>
> > >>
> > > Don't know if this qualifies as Heisenbug [0], since debugging and
> debug>>
> > > logging are not the same thing, but this NPE seems to only show when
> I>>
> > > switch logging to DEBUG. Using 1.16.0. Didn't go further into it.>>
> > >>
> > > Caused by:>>
> > > java.lang.NullPointerException>>
> > >>
> >
> org.apache.isis.viewer.wicket.model.models.ScalarModelWithPending$Util$1#
> setObject(ScalarModelWithPending.java:75)>>
>
> >
> > >>
> > > -- ScalarModelWithPending.java lines 74-76 -->>
> > > if (LOG.isDebugEnabled()) {>>
> > > LOG.debug("setting to: " +>>
> > > adapterMemento!=null?adapterMemento.toString():null);>>
> > > }>>
> > >>
> > > Thanks and regards>>
> > > Martin>>
> > >>
> > >>
> > > [0] https://en.wikipedia.org/wiki/Heisenbug>>
> > >>
> > -- >
> > Andreas Huber>
> > *early corax KG*>
> > Hofzeile 11/3/11, A-1190 Wien, mobile: +43 699 19468928, web:>
> > www.corax.at <http://www.corax.at>>
> > Firmensitz Wien FN 343630 p, Handelsgericht Wien>
> >
> --
> Andreas Huber
> *early corax KG*
> Hofzeile 11/3/11, A-1190 Wien, mobile: +43 699 19468928, web:
> www.corax.at <http://www.corax.at>
> Firmensitz Wien FN 343630 p, Handelsgericht Wien
>
Re: NPE on Debug logging in ScalarModelWithPending.java
Posted by Andreas Huber <a....@corax.at>.
Will be solved with release 1.16.1.
Issue: ISIS-1858 [1]
Thanks again!
[1] https://issues.apache.org/jira/browse/ISIS-1858
On 2018/02/01 06:55:51, Andreas Huber <a....@corax.at> wrote:
> Hi Martin,>
>
> thanks for this nice little Java puzzler. It got me curious and I had to>
> lookup Java operator precedence to solve this one, we need parentheses!>
>
> Cheers!>
>
> On 2018/02/01 03:23:09, Martin Hesse <m....@gmail.com> wrote:>
> > Hi,>>
> >>
> > Don't know if this qualifies as Heisenbug [0], since debugging and
debug>>
> > logging are not the same thing, but this NPE seems to only show when
I>>
> > switch logging to DEBUG. Using 1.16.0. Didn't go further into it.>>
> >>
> > Caused by:>>
> > java.lang.NullPointerException>>
> >>
>
org.apache.isis.viewer.wicket.model.models.ScalarModelWithPending$Util$1#setObject(ScalarModelWithPending.java:75)>>
>
> >>
> > -- ScalarModelWithPending.java lines 74-76 -->>
> > if (LOG.isDebugEnabled()) {>>
> > LOG.debug("setting to: " +>>
> > adapterMemento!=null?adapterMemento.toString():null);>>
> > }>>
> >>
> > Thanks and regards>>
> > Martin>>
> >>
> >>
> > [0] https://en.wikipedia.org/wiki/Heisenbug>>
> >>
> -- >
> Andreas Huber>
> *early corax KG*>
> Hofzeile 11/3/11, A-1190 Wien, mobile: +43 699 19468928, web:>
> www.corax.at <http://www.corax.at>>
> Firmensitz Wien FN 343630 p, Handelsgericht Wien>
>
--
Andreas Huber
*early corax KG*
Hofzeile 11/3/11, A-1190 Wien, mobile: +43 699 19468928, web:
www.corax.at <http://www.corax.at>
Firmensitz Wien FN 343630 p, Handelsgericht Wien
Re: NPE on Debug logging in ScalarModelWithPending.java
Posted by Andreas Huber <a....@corax.at>.
Hi Martin,
thanks for this nice little Java puzzler. It got me curious and I had to
lookup Java operator precedence to solve this one, we need parentheses!
Cheers!
On 2018/02/01 03:23:09, Martin Hesse <m....@gmail.com> wrote:
> Hi,>
>
> Don't know if this qualifies as Heisenbug [0], since debugging and debug>
> logging are not the same thing, but this NPE seems to only show when I>
> switch logging to DEBUG. Using 1.16.0. Didn't go further into it.>
>
> Caused by:>
> java.lang.NullPointerException>
>
org.apache.isis.viewer.wicket.model.models.ScalarModelWithPending$Util$1#setObject(ScalarModelWithPending.java:75)>
>
> -- ScalarModelWithPending.java lines 74-76 -->
> if (LOG.isDebugEnabled()) {>
> LOG.debug("setting to: " +>
> adapterMemento!=null?adapterMemento.toString():null);>
> }>
>
> Thanks and regards>
> Martin>
>
>
> [0] https://en.wikipedia.org/wiki/Heisenbug>
>
--
Andreas Huber
*early corax KG*
Hofzeile 11/3/11, A-1190 Wien, mobile: +43 699 19468928, web:
www.corax.at <http://www.corax.at>
Firmensitz Wien FN 343630 p, Handelsgericht Wien