8 Replies Latest reply on Mar 9, 2004 10:40 AM by Shigeru Chiba

    Bug in compiler with null

    Bill Burke Master

      I have been having trouble sometimes passing in null to a method call, particularly arrays. It is weird sometimes null just works, sometimes I have to typecast it, sometimes I have to declare a variable and pass the variable in. I don't have a testcase yet because sometimes it works, sometimes it doesn't.

      i.e.

      {
       Object[] args = null;
       foo.someMethod(args);
      
      OR....
      
       foo.someMethod((Object[])null); // sometimes this doesn't work either
      }
      /code]
      
      instead of just
      
      
      {
      
       foo.someMethod(null);
      }
      /code]