Yes, it was a bug.



On Wed, Aug 14, 2013 at 10:09 AM, Peter Veentjer
<notifications@github.com>wrote:

> In hazelcast/src/main/java/com/hazelcast/map/MapService.java:
>
> > @@ -668,13 +672,18 @@ public boolean compare(String mapName, Object value1, Object value2) {
> >          }
> >
> >          MapContainer mapContainer = getMapContainer(mapName);
> > -        if (mapContainer.getMapConfig().getInMemoryFormat().equals(MapConfig.InMemoryFormat.BINARY)) {
> > -            return toData(value1).equals(toData(value2));
> > -        } else if (mapContainer.getMapConfig().getInMemoryFormat().equals(MapConfig.InMemoryFormat.OBJECT)) {
> > -            return toObject(value1).equals(toObject(value2));
> > -        }
> > -        return value1.equals(value2);
> > -    }
> > +        MapConfig.InMemoryFormat inMemoryFormat = mapContainer.getMapConfig().getInMemoryFormat();
> > +        switch (inMemoryFormat){
> > +            case BINARY:
> > +                return toData(value1).equals(toData(value2));
> > +            case OBJECT:
> > +                return toObject(value1).equals(toObject(value2));
> > +            case CACHED:
>
> Ok. So this was a bug that was already in the system, correct?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/hazelcast/hazelcast/pull/663/files#r5756771>
> .
>



-- 
Enes Akar
Hazelcast | Open source in-memory data grid
Mobile: +90.507.150.56.71