File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
common/src/main/java/com/genexus
java/src/main/java/com/genexus/util/saia Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,14 @@ public <E> ArrayList<E> getExternalInstance() {
120
120
public void setExternalInstance (ArrayList <?> data )
121
121
{
122
122
try {
123
- clear ();
124
- for (Object item : data ) {
125
- T obj = elementsType .getConstructor (new Class []{}).newInstance ();
126
- obj .getClass ().getMethod ("setExternalInstance" , item .getClass ()).invoke (obj , item );
127
- super .add (obj );
128
- vectorExternal .add (item );
123
+ if (elementsType != null ) {
124
+ clear ();
125
+ for (Object item : data ) {
126
+ T obj = elementsType .getConstructor (new Class []{}).newInstance ();
127
+ obj .getClass ().getMethod ("setExternalInstance" , item .getClass ()).invoke (obj , item );
128
+ super .add (obj );
129
+ vectorExternal .add (item );
130
+ }
129
131
}
130
132
}
131
133
catch (Exception ex )
Original file line number Diff line number Diff line change @@ -103,7 +103,12 @@ public static class Message {
103
103
public void setRole (String role ) { this .role = role ; }
104
104
105
105
@ JsonIgnore
106
- public String getStringContent () { return ((StringContent ) content ).getValue (); }
106
+ public String getStringContent () {
107
+ if (content != null )
108
+ return ((StringContent ) content ).getValue ();
109
+
110
+ return null ;
111
+ }
107
112
@ JsonIgnore
108
113
public StructuredContent getStructuredContent () {return (StructuredContent )content ;}
109
114
public Content getContent () { return content ; }
You can’t perform that action at this time.
0 commit comments