Details
-
Enhancement
-
Resolution: Done
-
Major
-
2.2.0.SP1
-
None
-
None
Description
I've gone through the Weld code coverage report (including TCK, tests, arquillian tests) and discovered bunch of likely useless (not called) classes and some pieces of code. Classes are:
org.jboss.weld.bootstrap.ExtensionBeanDeployerEnvironment
org.jboss.weld.context.ForwardingWeldCreationalContext
org.jboss.weld.context.beanstore.ForwardingNamingScheme
org.jboss.weld.context.beanstore.http.LazyCyclicSessionBeanStore
org.jboss.weld.exceptions.NullableDependencyException
org.jboss.weld.executor.TaskPerItemTaskFactory
org.jboss.weld.injection.ForwardingInjectionTarget
org.jboss.weld.interceptor.util.InterceptorMetadataException
org.jboss.weld.manager.RemoveMetadataWrapperFunction
org.jboss.weld.resolution.ForwardingInterceptorResolvable
org.jboss.weld.resources.SharedObjectFacade
org.jboss.weld.serialization.NoopSerializableHolder
org.jboss.weld.util.annotated.ForwardingAnnotatedConstructor
org.jboss.weld.util.annotated.ForwardingAnnotatedField
org.jboss.weld.util.annotated.ForwardingAnnotatedParameter
org.jboss.weld.util.annotated.ForwardingWeldAnnotation
org.jboss.weld.util.annotated.ForwardingWeldConstructor
org.jboss.weld.util.annotated.ForwardingWeldField
org.jboss.weld.util.annotated.ForwardingWeldMember (called, but only in classes mentioned in this list)
org.jboss.weld.util.annotated.ForwardingWeldMethod
org.jboss.weld.util.annotated.ForwardingWeldParameter
org.jboss.weld.util.collections.ArrayListSupplier
org.jboss.weld.util.collections.ArraySetSupplier
org.jboss.weld.util.collections.ConcurrentHashSetSupplier
org.jboss.weld.util.collections.CopyOnWriteArrayListSupplier
org.jboss.weld.util.collections.DefaultValueMap
org.jboss.weld.util.collections.SetView
org.jboss.weld.util.dom.NodeListIterable
org.jboss.weld.util.dom.NodeListIterator (called in the class above only)
org.jboss.weld.util.reflection.ClassLoaderFunction
Following pieces of code could be likely also removed:
- org.jboss.weld.injection.DynamicInjectionPoint#DynamicInjectionPoint(org.jboss.weld.injection.SLSBInvocationInjectionPoint, java.lang.String)
- org.jboss.weld.injection.DynamicInjectionPoint#readResolve
- org.jboss.weld.util.Beans#findInterceptorBindingConflicts - not sure but I guess the if statement is useless in for cycle
- org.jboss.weld.util.bean.WrappedBeanHolder - this class is used in static classes, which are not likely referenced anywhere.
- org.jboss.weld.util.bytecode.DescriptorUtils#descriptorStringToParameterArray
- org.jboss.weld.util.bytecode.DescriptorUtils#isWide(java.lang.Class<?>)
- org.jboss.weld.util.bytecode.DescriptorUtils#getConstructorDescriptor
- org.jboss.weld.util.bytecode.DescriptorUtils#getMethodDescriptor(java.lang.reflect.Method)
All changes are available https://github.com/tremes/core/commit/6e7a4595d8b1cf4eaf1dee9a8924c4f1ee9e0cd2, but I still need to test it properly.