File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
src/main/java/org/springframework/data/aot Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 1515 */
1616package org .springframework .data .aot ;
1717
18+ import java .lang .reflect .InaccessibleObjectException ;
19+
1820import org .apache .commons .logging .Log ;
1921import org .apache .commons .logging .LogFactory ;
2022import org .springframework .data .mapping .Association ;
@@ -53,16 +55,22 @@ class AotMappingContext extends
5355 */
5456 public void contribute (Class <?> entityType ) {
5557
56- BasicPersistentEntity <?, AotPersistentProperty > entity = getPersistentEntity (entityType );
58+ try {
59+ BasicPersistentEntity <?, AotPersistentProperty > entity = getPersistentEntity (entityType );
5760
58- if (entity != null ) {
61+ if (entity != null && ! entity . getType (). isArray () ) {
5962
60- EntityInstantiator instantiator = instantiators .getInstantiatorFor (entity );
61- if (instantiator instanceof EntityInstantiatorSource source ) {
62- source .getInstantiatorFor (entity );
63- }
63+ EntityInstantiator instantiator = instantiators .getInstantiatorFor (entity );
64+ if (instantiator instanceof EntityInstantiatorSource source ) {
65+ source .getInstantiatorFor (entity );
66+ }
6467
65- propertyAccessorFactory .initialize (entity );
68+ propertyAccessorFactory .initialize (entity );
69+ }
70+ } catch (InaccessibleObjectException exception ) {
71+ if (logger .isInfoEnabled ()) {
72+ logger .info ("Unable to contribute bytecode accessor for [%s]" .formatted (entityType ), exception );
73+ }
6674 }
6775 }
6876
You can’t perform that action at this time.
0 commit comments