Skip to content

VectorFeatureWriterHandler: Handle null and non-string properties#1256

Merged
ZakarFin merged 1 commit intooskariorg:developfrom
jampukka:fix/non-string-properties
Mar 26, 2026
Merged

VectorFeatureWriterHandler: Handle null and non-string properties#1256
ZakarFin merged 1 commit intooskariorg:developfrom
jampukka:fix/non-string-properties

Conversation

@jampukka
Copy link
Copy Markdown
Member

Handle non-string and null property values, avoid errors such as:

org.json.JSONException: JSONObject["aloitusvuosi"] is not a string (class java.lang.Integer : 2024).
org.json.JSONException: JSONObject["asuntoalat"] is not a string (class org.json.JSONObject$Null : null).
        at org.json.JSONObject.wrongValueFormatException(JSONObject.java:3016)
        at org.json.JSONObject.getString(JSONObject.java:943)
        at fi.nls.oskari.control.feature.AbstractFeatureHandler.getFeature(AbstractFeatureHandler.java:171)
        at fi.nls.oskari.control.feature.VectorFeatureWriterHandler.handlePost(VectorFeatureWriterHandler.java:71)

@ZakarFin ZakarFin added this to the 3.3.0 milestone Mar 26, 2026
@ZakarFin ZakarFin merged commit e2c8202 into oskariorg:develop Mar 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants