Skip to content

Commit

Permalink
Fix to StringValue in Json
Browse files Browse the repository at this point in the history
If the argument is not a JsonString, it calls toString on it instead of
returning the empty string.
  • Loading branch information
sylvainhalle committed Sep 4, 2024
1 parent dc84856 commit 82493b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Json/src/ca/uqac/lif/cep/json/StringValue.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
BeepBeep, an event stream processor
Copyright (C) 2008-2023 Sylvain Hallé
Copyright (C) 2008-2024 Sylvain Hallé
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -41,6 +41,6 @@ public String getValue(JsonElement x)
{
return ((JsonString) x).stringValue();
}
return "";
return x.toString();
}
}

0 comments on commit 82493b9

Please sign in to comment.