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
Add a generic parameter <E> to getExternalInstance (#986)
* Add a generic parameter <E> to getExternalInstance
To avoid getting warning: [unchecked] unchecked cast when generated code uses this method.
So now instead of being declared as
public ArrayList getExternalInstance()
it is declared as
public <E> ArrayList<E> getExternalInstance()
with <E> being the type parameter.
You can then call the method passing an explicit parameter, e.g.:
chatHistory.<OpenAIResponse.Message>getExternalInstance();
which we currently don't generate, but just using
chatHistory.getExternalInstance();
also does not yield a warning.
* Add generics ni array creation and cast in add method
---------
Co-authored-by: Gustavo Brown Rodriguez <[email protected]>
Co-authored-by: iroqueta <[email protected]>
0 commit comments