eclipse-uml2 / uml2

An EMF-based implementation of the UML 2.x metamodel for the Eclipse platform.
Eclipse Public License 2.0
5 stars 4 forks source link

UMLResource unload normalizes URIs #97

Open eclipse-uml2-bot opened 1 week ago

eclipse-uml2-bot commented 1 week ago

| --- | --- | | Bugzilla Link | 549135 | | Status | NEW | | Importance | P3 normal | | Reported | Jul 10, 2019 08:24 EDT | | Modified | Jul 10, 2019 08:24 EDT | | Reporter | Ed Willink |

Description

While debugging URI activities, I observed some surprisingly prolific calls to URIConverter.normalize.

It is presumably necessary for CacheAdapter.removeProxy to clean up the proxy with a normalize, but is it necessary for an unload() to clean up everything when all that is actually required is to throw away everything?

proxyMap.clear() looks much more efficient.

Is a UMLUtil.disposeResource() needed to provide a much more efficient UMLResource dispose().

Rerun org.eclipse.ocl.examples.test.xtext.SerializeTests.test_StateMachines_uml_Serialize [JUnit] \ org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at localhost:62382 \ Thread [main] (Suspended (breakpoint at line 78 in CacheAdapter$InverseCrossReferencer)) \ owns: CacheAdapter$InverseCrossReferencer (id=4669) \ owns: PivotEnvironmentFactory (id=4637) \ owns: OCLInternal (id=4638) \ CacheAdapter$InverseCrossReferencer.normalizeURI(URI, Resource) line: 78 \ CacheAdapter$InverseCrossReferencer.normalizeURI(URI, EObject) line: 93 \ CacheAdapter$InverseCrossReferencer(ECrossReferenceAdapter$InverseCrossReferencer).removeProxy(EObject, EObject) line: 418 \ CacheAdapter$InverseCrossReferencer(ECrossReferenceAdapter$InverseCrossReferencer).remove(EObject, EReference, EObject) line: 389 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(EObject) line: 1077 \ CacheAdapter.unsetTarget(EObject) line: 455 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(Notifier) line: 1056 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Adapter) line: 526 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Object) line: 1 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(ArrayDelegatingEList).remove(int) line: 656 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(AbstractEList).remove(Object) line: 456 \ CacheAdapter(ECrossReferenceAdapter).removeAdapter(Notifier) line: 1167 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(EObject) line: 1095 \ CacheAdapter.unsetTarget(EObject) line: 455 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(Notifier) line: 1056 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Adapter) line: 526 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Object) line: 1 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(ArrayDelegatingEList).remove(int) line: 656 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(AbstractEList).remove(Object) line: 456 \ CacheAdapter(ECrossReferenceAdapter).removeAdapter(Notifier) line: 1167 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(EObject) line: 1095 \ CacheAdapter.unsetTarget(EObject) line: 455 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(Notifier) line: 1056 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Adapter) line: 526 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Object) line: 1 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(ArrayDelegatingEList).remove(int) line: 656 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(AbstractEList).remove(Object) line: 456 \ CacheAdapter(ECrossReferenceAdapter).removeAdapter(Notifier) line: 1167 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(EObject) line: 1095 \ CacheAdapter.unsetTarget(EObject) line: 455 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(Notifier) line: 1056 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Adapter) line: 526 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Object) line: 1 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(ArrayDelegatingEList).remove(int) line: 656 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(AbstractEList).remove(Object) line: 456 \ CacheAdapter(ECrossReferenceAdapter).removeAdapter(Notifier) line: 1167 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(EObject) line: 1095 \ CacheAdapter.unsetTarget(EObject) line: 455 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(Notifier) line: 1056 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Adapter) line: 526 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Object) line: 1 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(ArrayDelegatingEList).remove(int) line: 656 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(AbstractEList).remove(Object) line: 456 \ CacheAdapter(ECrossReferenceAdapter).removeAdapter(Notifier) line: 1167 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(EObject) line: 1095 \ CacheAdapter.unsetTarget(EObject) line: 455 \ CacheAdapter(ECrossReferenceAdapter).unsetTarget(Notifier) line: 1056 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Adapter) line: 526 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList.didRemove(int, Object) line: 1 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(AbstractEList).didClear(int, Object[]) line: 170 \ MinimalEObjectImpl$1ArrayDelegatingAdapterList(ArrayDelegatingEList).clear() line: 704 \ UMLResourceImpl(ResourceImpl).unloaded(InternalEObject) line: 1634 \ UMLResourceImpl(ResourceImpl).doUnload() line: 1706 \ UMLResourceImpl(XMLResourceImpl).doUnload() line: 720 \ UMLResourceImpl(ResourceImpl).unload() line: 1721 \ PivotEnvironmentFactory(AbstractEnvironmentFactory).disposeInternal() line: 604 \ PivotEnvironmentFactory(AbstractEnvironmentFactory).dispose() line: 555 \ PivotEnvironmentFactory(AbstractEnvironmentFactory).detach(Object) line: 541 \ OCLInternal(OCL).dispose() line: 357 \ SerializeTests.test_StateMachines_uml_Serialize() line: 751 \ NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] \ NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62 \ DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 \ Method.invoke(Object, Object...) line: 498 \ SerializeTests(TestCase).runTest() line: 176 \ SerializeTests(TestCase).runBare() line: 141 \ TestResult$1.protect() line: 122 \ TestResult.runProtected(Test, Protectable) line: 142 \ TestResult.run(TestCase) line: 125 \ SerializeTests(TestCase).run(TestResult) line: 129 \ TestSuite.runTest(Test, TestResult) line: 252 \ TestSuite.run(TestResult) line: 247 \ JUnit38ClassRunner.run(RunNotifier) line: 86 \ JUnit4TestReference.run(TestExecution) line: 89 \ TestExecution.run(ITestReference[]) line: 41 \ RemoteTestRunner.runTests(String[], String, TestExecution) line: 541 \ RemoteTestRunner.runTests(TestExecution) line: 763 \ RemoteTestRunner.run() line: 463 \ RemoteTestRunner.main(String[]) line: 209 \ Thread [ReaderThread] (Running) \ Daemon Thread [EMF Reference Cleaner] (Running) \ Daemon Thread [com.google.inject.internal.util.$Finalizer] (Running) \ C:\Program Files\Java\jdk1.8.0_211\bin\javaw.exe (10 Jul 2019, 13:12:48)