*********
Problem : "Introduce Variable" could be smarter when extracting null.
*********

Example
********

When writing a test for a method
      H.aMethod (String s, HttpServletRequest r, AClass c) ;


, I would start by typing
    
   public void testAMethod () {
          H.aMethod (null, null, null) ;
   }


and then quickly Introduce 3 variables for the 3 null,
to

   public void testAMethod () {

          String               aSring = null ;
          HttpServletRequest   req    = null ;
          AClass               aClass = null ;

          H.aMethod (aString , req, aClass)  ;
   }

*****************************************************
Problem : this is not the way introduce variable works.
*****************************************************


In fact, extracting the 3 null above produces :

   public void testAMethod () {

          Object aSring = null ;
          Object req    = null ;
          Object aClass = null ;

          H.aMethod (aString , req, aClass)  ;
   }

*********
Request :
*********
When extracting "null" to a variable, use the proper type, and not 'Object'.



Alain Ravet
Brussels, Belgium

This mail has been checked by exiscan.
To be safe, please scan the mail attachements with your local virus scanner !

_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to