Regression in itw from Tue Mar 26
Adam Domurad
adomurad at redhat.com
Wed Apr 24 09:41:51 PDT 2013
On 04/24/2013 12:37 PM, Jiri Vanek wrote:
> On 04/24/2013 06:34 PM, Adam Domurad wrote:
>>> + @Test
>>> + public void testNotNullJnlpFile(){
>>> + SecurityDesc securityDesc = new SecurityDesc(new
>>> DummyJNLPFile(),
>>> SecurityDesc.SANDBOX_PERMISSIONS, "hey!");
>>> + Assert.assertNotNull("securityDesc should not be
>>> ",securityDesc);
>>> +
>>> + }
>>
>> Huh. Why is this still in ? Sorry, I can't support superstitious coding.
>>
>> At least drop the assert if you want a constructor sanity check.
>
> No. I would like to keep it inside even with assert.
> The code inside the constructor can change later. Eg some dummy jnl
> file will be tried to be created and used into if argument is null.
>
> I would like to have it recorded.
Sorry, but this assert is really a no-op. How could the result of 'new'
ever be null ?
I'm OK with just running the constructor, but I really don't understand
why you want this line. It's like asserting assertNotNull(new Object());
It's plain superstition.
-Adam
>
>>
>> Push without this please. Otherwise good.
>>
>> Happy hacking,
>> -Adam
>
More information about the distro-pkg-dev
mailing list