This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Binding event is fired BindingEvent: [bindingName=tmBinding, type=3] [context=Context: [absoluteName=/testSimpleBindingEvents/TMA], but there is not true: (event.getObject ("tmBinding", null) != null). See stacktrace [snipped]: org.netbeans.core.registry.ContextImpl.fireBindingEvent(ContextImpl.java:298) org.netbeans.core.registry.Listener.fireContextEvent(Listener.java:185) org.netbeans.core.registry.Listener.fireContextEvent(Listener.java:169) org.netbeans.core.registry.Listener.fileAttributeChanged(Listener.java:74)
There is obvious, that as soon as event is fired, then Context (evt.getSource or evt.getContext) must be in consistent status, which means that added or modified suncontext, binding or attribute must be reachable and on the other hand removed suncontext, binding or attribute can't be reachable.
Radek, I modified method bindingChanged() in openide/registry/test/src/org.netbeans.api.registry.EventsTest.Listener class to report event and value of binding: System.err.println("event="+evt); System.err.println("bnd="+evt.getContext().getObject(evt.getBindingName(), null)); But everything looks OK. The values are available. Could you please compare the test with your case and tell me what is the difference?
Sorry, the problem in reality is, that following assert is not satisfied: if (evt.getContext().getObject ("bName", null) == null) { assertFalse (evt.getContext().getBindingName ().contains ("bName")); } This problem its origin in #16761, where method getAttributes returns also deleted attributes. But I've decided to fix it in Context impl. and verify in Context code if attribute has non-null value, which will definitely cause performance problems. So, added PERFORMANCE keyword and changed summary: REGISTRY: don't verify fo.getAttributes for each name by call fo.getAttribute != null partcicularly in: getAttributeNames, getBindingNames
Verification added, getAttributes filtered - commited into trunk: /cvs/core/registry/src/org/netbeans/core/registry/ContextImpl.java,v new revision: 1.13; previous revision: 1.12 /cvs/core/registry/src/org/netbeans/core/registry/olddsimpl/ObjectBindings. new revision: 1.4; previous revision: 1.3
Is this fixed or not?
Reassigning to new module owner jskrivanek.
Registry module is obsolete.