[Nice-commit] Nice NEWS,1.65,1.66
Brought to you by:
bonniot
|
From: Artem Gr K. <ar...@us...> - 2005-03-07 10:32:25
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19668 Modified Files: NEWS Log Message: maybeNull, and RFE 681385 Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** NEWS 7 Mar 2005 08:27:52 -0000 1.65 --- NEWS 7 Mar 2005 10:32:10 -0000 1.66 *************** *** 1,5 **** nice (0.9.11) ! * -- --- 1,19 ---- nice (0.9.11) ! * maybeNull, a counterpart to the notNull, might be used from now on ! to test variables returned from Java libraries without retyping: ! let prng = SecureRandom.getInstance("ARCFOUR"); ! // Test if a bad implementation has returned null instead of exception. ! if(maybeNull(prng) == null) workaround(); ! * Nullness analysis of assignments (RFE 681385) is partially implemented. ! It is now possible to write: ! class Foo {} ! var ?Foo FOO_INSTANCE = null; ! Foo getFooInstance(){ ! var instance = FOO_INSTANCE; if( null != instance ) return instance; ! instance = new Foo(); FOO_INSTANCE = instance; return instance; ! } ! becouse Nice will detect that "instance" is of a "sure type" ! after the "instance = new Foo();" assignment. -- |