[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Boolean.FALSE and Boolean.TRUE  XML
Forum Index -> Terracotta Platform
Author Message
pjstadig

neo

Joined: 03/04/2009 10:01:13
Messages: 3
Offline

I'm working on a TIM for Clojure. Clojure uses Boolean.TRUE and Boolean.FALSE for it's boolean values, and for some reason when I pull a Boolean value out of the DSO and compare it to a local value using ==, I get incorrect results.

I don't think Clojure ever creates Booleans, but just uses Boolean.TRUE and Boolean.FALSE. I tried making Boolean.TRUE and Boolean.FALSE roots, but got an error.

As I understand, java.lang.Boolean values are literals. Is there something special I need to do to make them Boolean.TRUE == Boolean.TRUE across VMs, or is this not supported?


Paul Stadig
steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

With static constants the answer is usually to make them roots. Have you tried that? I haven't tried this with Boolean.TRUE or FALSE but that's where I would start.

Want to post to this forum? Join the Terracotta Community
pjstadig

neo

Joined: 03/04/2009 10:01:13
Messages: 3
Offline

Making Boolean.TRUE and Boolean.FALSE roots causes the following error:

Exception in thread "main" java.lang.NoSuchMethodError: java.lang.Boolean.__tc_getTRUE()Ljava/lang/Boolean;
at tctest.TcTest.main(TcTest.java:18)
pjstadig

neo

Joined: 03/04/2009 10:01:13
Messages: 3
Offline

*bump*

How do I make Boolean.TRUE == Boolean.TRUE across VMs? I get an error when trying to make java.lang.Boolean.TRUE a root.


Paul
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team