var argMap = new HashMap<String, Object>();
argMap.put( "language", language );
argMap.put( "moduleType", moduleType );
argMap.put( "project", project );
argMap.put( "name", name ); // name is Nullable
/Users/calebcushing/IdeaProjects/brix/src/main/java/com/xenoterracide/brix/Application.java:116: error: [argument.type.incompatible] incompatible argument for parameter arg1 of put.
argMap.put( "name", name );
^
found : @Initialized @Nullable String
required: @Initialized @NonNull Object
I think it should be this, since the documentation for HashMap clearly states it can have null keys or values.
package java.util;
import org.checkerframework.checker.nullness.qual.PolyNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class HashMap<K,V> extends AbstractMap<K,V>
implements Map<K,V>, Cloneable, Serializable {
@PolyNull V put( @Nullable K key, @PolyNull V value);
}
I think it should be this, since the documentation for HashMap clearly states it can have null keys or values.