Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tinkergraph loses false values if I don't use to_java on them.

  • Loading branch information...
commit 887e544ca13355d4f53787e704618b242d3bd39c 1 parent 4b19105
@pangloss pangloss authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/pacer/graph/simple_encoder.rb
View
11 lib/pacer/graph/simple_encoder.rb
@@ -1,16 +1,25 @@
module Pacer
class SimpleEncoder
+ JBoolean = java.lang.Boolean
+ JFalse = false.to_java
+
def self.encode_property(value)
if value.is_a? String
value = value.strip
value unless value == ''
+ elsif false == value
+ JFalse
else
value
end
end
def self.decode_property(value)
- value
+ if value.is_a? JBoolean and value == JFalse
+ false
+ else
+ value
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.