Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion client/src/com/aerospike/client/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,8 @@ public long toLong() {
* Float value.
*/
public static final class FloatValue extends Value {
private volatile String cachedString;

private final float value;

public FloatValue(float value) {
Expand Down Expand Up @@ -1109,7 +1111,12 @@ public LuaValue getLuaValue(LuaInstance instance) {

@Override
public String toString() {
return Float.toString(value);
String s = cachedString;
if (s == null) {
s = Float.toString(value);
cachedString = s;
}
return s;
}

@Override
Expand Down