Strange case of CheckParametersNullityInVisibleMethodsRule

12 views
Skip to first unread message

Daniel Lidström

unread,
Jun 20, 2011, 8:22:19 AM6/20/11
to gend...@googlegroups.com
Hello,
 
I've just experienced a strange case of CheckParametersNullityInVisibleMethodsRule. I don't understand why it fires for my code. Here's the "offending" code:
 
        public void SetVarValue( int lEMLArea, ref string szVar, ref string szValue, ref int lValue )
        {
            short rc = 0;
  
            rc = _insObjectClass.SetVarValue( lEMLArea, szVar, szValue, lValue );
            if (rc < -1)
                throw new InsObjectException(rc);
        }
The method being called looks like this: 
public virtual short SetVarValue(int lEMLID, object vaVar, string szValue, int lValue);
Why is the rule being fired here?
/Daniel

Sebastien Pouliot

unread,
Jun 20, 2011, 9:01:00 PM6/20/11
to gend...@googlegroups.com
Hello Daniel,

I'm very busy at the moment so please fill bug reports for such issues
(it's the only to ensure they won't be forgotten when I, or someone
else, gets some free time ;-)

Sebastien

p.s. a quick guess is that 'ref' parameters are misreported when simply
passed down to another call. It's probably something easy to fix if
someone wants to try :)

> --
> You received this message because you are subscribed to the Google
> Groups "Gendarme" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/gendarme/-/4ps_X0j2d9sJ.
> To post to this group, send email to gend...@googlegroups.com.
> To unsubscribe from this group, send email to gendarme
> +unsub...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/gendarme?hl=en.


Daniel Lidström

unread,
Jun 21, 2011, 8:14:17 AM6/21/11
to gend...@googlegroups.com, sebastie...@gmail.com
Thanks Sebastien, I will file a report.

/Daniel
Reply all
Reply to author
Forward
0 new messages