|
Super Lloyd wrote: grrmmrrbblll... at least the analyiser is OK with an if statement, as in if (x != null) x.Dispose(); . I comlpetely agree with the warning. It is also not a compiler-error, but merely a suggestion.
someobject?.dispose() means you're not sure if there is anything to dispose. It is an "on error resume next" thingy, and it is dirty.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: someobject?.dispose() means you're not sure if there is anything to dispose. Kind of like saying if x might be null?
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
No, more like saying "I don't know what I'm doing, but this might need disposing".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Full Reset
|
|
|
|
|
How about tests that pass with no complaints until you upgrade/update Mockito and the JDK to OpenJDK 11?
|
|
|
|
|
Well... I stay away from Java! Problem solved, ya?!
But yeah, I can feel the hell on your heels!
|
|
|
|
|
Super Lloyd wrote: Well... the compiler seems to think like you...
Meanwhile I think you never have used that syntax, don't you?
For your information, it is exactly like if (x != null).
And, in fact, it is way better when you have a long chain of possible nulls, like a.b.c.d.e I was typing a reply to that post when you deleted it
Super Lloyd wrote: Well... the compiler seems to think like you... It's not a compiler-error, it is a warning. Sometimes you can ignore them, but a lot of warnings in a large project usually says something about the quality of the product.
Super Lloyd wrote: Meanwhile I think you never have never used that syntax, don't you? I do, but not indiscriminately, and where appropriate.
Super Lloyd wrote:
For your information, it is exactly like if (x != null) . No, as I already explained (!) it is functionaly the same. Also explained why I don't like it.
Super Lloyd wrote: And, in fact, it is way better when you have a long chain of possible nulls, like a.b.c.d.e It has its uses, but it is also very prone to abuse.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: I was typing a reply to that post when you deleted it
I am getting better at identifying, and following on that identification, when no answer is the best answer...
|
|
|
|
|
I was waiting with answering to see if you were to delete this too
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
warnings are useful: pass the warning to the newbies: those that can fix them without breaking something promote them to [fixing] errors, otherwise sack or pass them to another team.
Message Signature
(Click to edit ->)
|
|
|
|
|
Who's the more toolish; the tool or the tool who uses it?
|
|
|
|
|
Super Lloyd wrote: is OK with an if statement, as in if (x != null) x.Dispose(); . The c# language is too complex for the analysis tool.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
true!
|
|
|
|
|
Super Lloyd wrote: at least the analyiser is OK with an if statement, as in if (x != null) x.Dispose(); . I'd like to think that that happens because it could encourage good standards, but it's more likely because the analyser did a simple search on "x.Dispose()".
It might even work if you assign "x.Dispose()" to a string as a value.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
Super Lloyd wrote: You know that satisfying feeling you get when your code has 0 compilation errors, 0 compilations warning, all unit test pass?
Nope
|
|
|
|
|
|
@User-10476399
You won, remember?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Where's the CCC?
Right between the BBB and the DDD
But more important question... when did stutters become contagious...
|
|
|
|
|
Shouldn't it be CCB and CCD?
|
|
|
|
|
FFF ....
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Sorry, folks, the curse of the drinking classes struck in dramatic style, this morning, we had a bit of a crisis.
The clue I was going to set had a seven letter answer ending in "m" ...
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
Was it - perchance - SCROTUM? You would have made MM's whole week!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It was! How on earth did you manage to figure that one out?
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|