You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * @return The value of the {@code context} attribute */@OverridepublicMap<String, Object> getContext() {
returncontext;
}
/** * Put one entry to the {@link ProcessedFileConfiguration#getContext() context} map. * @param key The key in the context map * @param value The associated value in the context map * @return {@code this} builder for use in a chained invocation */publicfinalBuilderputContext(Stringkey, Objectvalue) {
if (this.context == null) {
this.context = newLinkedHashMap<String, Object>();
}
this.context.put(key, value);
returnthis;
}
publicfinalBuildercontext(Map<String, ? extendsObject> entries) {
if (entries == null) {
this.context = null;
returnthis;
}
this.context = newLinkedHashMap<String, Object>();
returnputAllContext(entries);
}
which results in checker having compile errors because the intent is for values to be nullables but but the generated object only takes non nullables.
The text was updated successfully, but these errors were encountered:
As discussed recently in another issue (#1288), there are some difficult problems with type level annotations on type arguments. @AllowNulls/@SkipNulls (from any package) on a collection might produce some signatures with nullable args in theory.
I told the code to include the type level annotations so that error prone or checker framework can properly do its job...
you can close this through if you want, I'm removing immutables, it's far too painful to work with. I spend more time trying to figure out how to make it do what I want due to an unintuitive API (could be fixed with a v3) that defaults to arguably incorrect behavior, than writing productive code. With this, it appears I can't actually make use of the compile time safety features I want. Well, that's not entirely true, I could go about treating the generated code as a 3rd party library, but that's just annoying to write even more code for that when I feel like this should just work.
I have this class
but this (etc) is being generated
which results in checker having compile errors because the intent is for values to be nullables but but the generated object only takes non nullables.
The text was updated successfully, but these errors were encountered: