contract nulls are compatible with array return types (IDEA-137323)

This commit is contained in:
peter
2015-03-06 14:59:53 +01:00
parent e8fde4e27f
commit 8d2f9b07e8
3 changed files with 12 additions and 1 deletions
@@ -0,0 +1,10 @@
import org.jetbrains.annotations.Contract;
class Zoo {
@Contract( "null->null" )
static byte[] bar( String s )
{
if ( s == null )
return null;
return new byte[0];
}}