You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
public class CacheTest {
public static void main(String[] args) {
HazelcastInstance hazelcast = Hazelcast.newHazelcastInstance();
IMap map = hazelcast.getMap("test");
map.addInterceptor(new MyInterceptor());
map.addEntryListener(new MyListener(), true);
map.put(1, "wsad");
map.put(1, "qwerty");
}
static class MyListener implements EntryAddedListener, EntryUpdatedListener {
@Override
public void entryAdded(EntryEvent event) {
System.out.println("Got event add");
}
@Override
public void entryUpdated(EntryEvent event) {
System.out.println("Got event update");
}
}
static class MyInterceptor implements MapInterceptor {
@Override
public Object interceptGet(Object value) {
return null;
}
@Override
public void afterGet(Object value) {
}
@Override
public Object interceptPut(Object oldValue, Object newValue) {
return newValue.toString().toUpperCase();
}
@Override
public void afterPut(Object value) {
}
@Override
public Object interceptRemove(Object removedValue) {
return null;
}
@Override
public void afterRemove(Object value) {
}
}
}
`
You will notice, that the interceptor right before put is changing strings to upper-case version of those values. The listener however receives an "old" value (lowercase version).
Is that to be expected or is it a bug in Hazelcast, or maybe a misconfiguration?
The text was updated successfully, but these errors were encountered:
It says here, that it was added to 3.6.1 milestone, but in the referenced #7416 it says that it's been added to 3.7.
Which version should we expect this bug to be fixed in and what timeline are we looking at here?
Thank you very much for taking such a quick action on this!
we have a backport too #7417
I can't say much about the release timing but we've just released 3.6 so you may expect a patch release (3.6.1) in a month or so
Hello,
If you consider the following code:
`
public class CacheTest {
public static void main(String[] args) {
HazelcastInstance hazelcast = Hazelcast.newHazelcastInstance();
}
`
You will notice, that the interceptor right before put is changing strings to upper-case version of those values. The listener however receives an "old" value (lowercase version).
Is that to be expected or is it a bug in Hazelcast, or maybe a misconfiguration?
The text was updated successfully, but these errors were encountered: