fred icon indicating copy to clipboard operation
fred copied to clipboard

avoid breaking on getting a stray null

Open ArneBab opened this issue 3 years ago • 5 comments

ArneBab avatar Aug 05 '22 22:08 ArneBab

I am skeptical about this. Why should message ever be null? That code is only used within Fred, right? There’s no user input involved? Because if there isn’t it should be made sure that null is never handed into this.

Does my reply on FLIP answer your question?

ArneBab avatar Aug 24 '22 22:08 ArneBab

Does my reply on FLIP answer your question?

Not really. 😁 I traced back every call of that method and I couldn’t see how anything given in to this method can ever be null.

Bombe avatar Aug 25 '22 07:08 Bombe

I traced back every call of that method and I couldn’t see how anything given in to this method can ever be null.

Damn :-)

I also found no way how this could happen, I only saw that it did. When we get there, we’re deep in callback hell with timeouts, so I’m not sure whether I found every possible path.

ArneBab avatar Aug 25 '22 07:08 ArneBab

@Bombe do you see any way how this change could cause problems? If not, I’d like to merge it, because it fixes a problem that was actually observed. Ack?

ArneBab avatar Sep 30 '22 23:09 ArneBab

The only problem I have with it is that I see no way for this to be necessary or even useful. As soon as you (or anybody, really 🙂) can show me how a null can be given into that method, I’m all for fixing it. Well, actually, I’d rather fix the root cause for there being a null in the first place… 😁

Bombe avatar Oct 06 '22 21:10 Bombe

I checked the reported problem again and found that the NPE was most likely caused by changes done to the code by the reporter. This bug can be closed: Not a Bug.

@Bombe thank you for being sceptical! :heart:

ArneBab avatar Nov 13 '22 16:11 ArneBab

not a bug

ArneBab avatar Sep 04 '23 09:09 ArneBab