Skip to content

Commit

Permalink
AER-2686 Avoid using Object in class that GWT picks up (#52)
Browse files Browse the repository at this point in the history
Apparantly using an Object prevents the application from starting. Think it can be altered to use a String instead, this change should at least fix startup.
  • Loading branch information
BertScholten authored Mar 5, 2024
1 parent 38f63a6 commit 05c5d04
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ColorLabelsLegend implements Legend {
private String outlineColor;
private Integer[] iconSizes;
private LegendType icon;
private Object[] filterables;
private String[] filterables;

// Needed for GWT.
public ColorLabelsLegend() {
Expand Down Expand Up @@ -117,11 +117,11 @@ public void setOutlineColor(final String outlineColor) {
this.outlineColor = outlineColor;
}

public Object[] getFilterables() {
public String[] getFilterables() {
return filterables;
}

public void setFilterables(final Object[] filterables) {
public void setFilterables(final String[] filterables) {
this.filterables = filterables;
}

Expand Down Expand Up @@ -153,11 +153,11 @@ public void addItem(final String label, final String color, final Integer iconSi
* @param iconSize optional iconSize
* @param filterable Filterable to use for this item.
*/
public void addItem(final String label, final String color, final Integer iconSize, final Object filterable) {
public void addItem(final String label, final String color, final Integer iconSize, final String filterable) {
addItem(label, color, iconSize);
this.filterables = filterables == null
? new Object[] {filterable}
: Stream.concat(Arrays.stream(this.filterables), Stream.of(filterable)).toArray(Object[]::new);
? new String[] {filterable}
: Stream.concat(Arrays.stream(this.filterables), Stream.of(filterable)).toArray(String[]::new);
}

@Override
Expand Down

0 comments on commit 05c5d04

Please sign in to comment.