Skip to content

Commit 53c7373

Browse files
claudiamurialdojechague
authored andcommitted
Gx properties fix (#102)
Issue 74868
1 parent 3e19cb3 commit 53c7373

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

common/src/main/java/com/genexus/util/GXProperties.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import java.util.Iterator;
1313

1414
public class GXProperties implements IGxJSONSerializable{
15-
private Vector<GXProperty> vector = new Vector<>();
15+
private Vector<GXProperty> vector = new Vector<GXProperty>();
1616
private boolean eof;
1717
private int lastElement;
1818

@@ -26,7 +26,7 @@ public void set(String name, String value)
2626

2727
public void add(String name, String value)
2828
{
29-
put(name, value);
29+
addToTheEnd(name, value);
3030
}
3131

3232
public void put(String name, String value)
@@ -38,13 +38,23 @@ public void put(String name, String value)
3838
}
3939
else
4040
{
41-
GXProperty prop = new GXProperty();
42-
prop.setKey(name);
43-
prop.setValue(value);
44-
vector.addElement(prop);
41+
addToTheEnd(name, value);
4542
}
4643
}
47-
44+
public String toString() {
45+
StringBuilder builder = new StringBuilder();
46+
for (GXProperty property : vector) {
47+
builder.append(property.getValue());
48+
}
49+
return builder.toString();
50+
}
51+
private void addToTheEnd(String name, String value){
52+
53+
GXProperty prop = new GXProperty();
54+
prop.setKey(name);
55+
prop.setValue(value);
56+
vector.addElement(prop);
57+
}
4858
public String get(String name)
4959
{
5060
int index = findElement(name);

0 commit comments

Comments
 (0)