[MAGNOLIA-7469] Annotation processing type resolver implementation Created: 26/Feb/19  Updated: 19/Jun/19  Resolved: 03/Apr/19

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1

Type: New Feature Priority: Neutral
Reporter: Robert Šiška Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 5d 4h 31m
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-5027 Use type aliases in framework Closed
relation
is related to MAGNOLIA-7486 DOC: Field references with $type and ... Closed
is related to MAGNOLIA-7559 Support whitelisting for AnnotationPr... Closed
Template:
Acceptance criteria:
Empty
Documentation update required:
Yes
Date of First Response:
Epic Link: Simpler YAML Configurations
Sprint: Foundation 5, Foundation 6, Foundation 7, Foundation 8
Story Points: 1

 Description   

Introduce type resolver capable of deducing the definition types from a string alias assigned via annotation instead of fully-qualified class name.



 Comments   
Comment by Roman Kovařík [ 21/Mar/19 ]

Reopened: missing type alias on a column definition prevents starting the instance

1) Error injecting constructor, java.lang.NullPointerException
  at info.magnolia.config.resolver.AnnotationProcessingTypeResolver.<init>(AnnotationProcessingTypeResolver.java:75)
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:155) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.config.resolver.AnnotationProcessingTypeResolver
  while locating info.magnolia.transformer.TypeResolver annotated with @com.google.inject.internal.Element(setName=,uniqueId=66, type=MULTIBINDER, keyType=)
  while locating java.util.Set<info.magnolia.transformer.TypeResolver>
    for the 1st parameter of info.magnolia.transformer.BeanTypeResolver.<init>(BeanTypeResolver.java:70)
  while locating info.magnolia.transformer.BeanTypeResolver
    for the 4th parameter of info.magnolia.config.module.ModuleMap2BeanTransformer.<init>(ModuleMap2BeanTransformer.java:80)
  while locating info.magnolia.config.module.ModuleMap2BeanTransformer
    for the 7th parameter of info.magnolia.config.module.ModuleConfigurationSourceFactory.<init>(ModuleConfigurationSourceFactory.java:63)
  while locating info.magnolia.config.module.ModuleConfigurationSourceFactory
    for the 3rd parameter of info.magnolia.config.module.ModuleConfigurationRegistry.<init>(ModuleConfigurationRegistry.java:66)
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:155) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.config.module.ModuleConfigurationRegistry
  while locating info.magnolia.config.registry.Registry annotated with @com.google.inject.internal.Element(setName=,uniqueId=45, type=MULTIBINDER, keyType=)
Caused by: java.lang.NullPointerException
	at info.magnolia.config.resolver.AnnotationProcessingTypeResolver.getAlias(AnnotationProcessingTypeResolver.java:104)
	at info.magnolia.config.resolver.AnnotationProcessingTypeResolver.lambda$resolveRelatedTypes$1(AnnotationProcessingTypeResolver.java:89)
Comment by Hieu Nguyen Duc [ 03/Apr/19 ]

QAed on bundle "magnolia-enterprise-pro-demo-bundle-6.0.1-20190402.184055-775-tomcat-bundle.zip"; please mind that type aliases work only on new UI framework e.g. contacts-v8. It doesn't work with Stories app.

Generated at Mon Feb 12 04:24:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.