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 15
15
*/
16
16
package org .springframework .data .aot ;
17
17
18
+ import java .lang .reflect .InaccessibleObjectException ;
19
+
18
20
import org .apache .commons .logging .Log ;
19
21
import org .apache .commons .logging .LogFactory ;
20
22
import org .springframework .data .mapping .Association ;
@@ -53,16 +55,22 @@ class AotMappingContext extends
53
55
*/
54
56
public void contribute (Class <?> entityType ) {
55
57
56
- BasicPersistentEntity <?, AotPersistentProperty > entity = getPersistentEntity (entityType );
58
+ try {
59
+ BasicPersistentEntity <?, AotPersistentProperty > entity = getPersistentEntity (entityType );
57
60
58
- if (entity != null ) {
61
+ if (entity != null && ! entity . getType (). isArray () ) {
59
62
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
+ }
64
67
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
+ }
66
74
}
67
75
}
68
76
You can’t perform that action at this time.
0 commit comments