namin / unsound

Artifact for OOPSLA'16 Paper on Unsoundness of Java and Scala
https://io.livecode.ch/learn/namin/unsound?img=java8
74 stars 4 forks source link

The Nullless example uses null, implicitly (Nitpicking for fun) #9

Open dylan-chong opened 7 years ago

dylan-chong commented 7 years ago

The field:

final Constrain<? super T> constrain;

is set to null implicitly since it is not set to anything, and the method:

Constrain<? super T> getConstrain() {
    return constrain;
  }

returns null... so perhaps it shouldn't be called 'Nullless'. It also means 'Nullless' exploits the same bug in the same way as 'Unsound.java in Java 8'.

Just saying! :P