File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
driver/src/main/java/org/neo4j/driver Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1616 */
1717package org .neo4j .driver ;
1818
19+ import java .lang .reflect .AccessibleObject ;
1920import java .time .DateTimeException ;
2021import java .time .LocalDate ;
2122import java .time .LocalDateTime ;
@@ -724,8 +725,14 @@ public interface Value extends MapAccessor, MapAccessorWithDefaultValue {
724725 * <li>Maximum matching properties.</li>
725726 * <li>Minimum mismatching properties.</li>
726727 * </ol>
727- * The constructor search is done in the order defined by the {@link Class#getDeclaredConstructors} and is
728- * finished either when a full match is found with no mismatches or once all constructors have been visited.
728+ * The constructor search is done in the order defined by the {@link Class#getDeclaredConstructors}.
729+ * <p>
730+ * Only constructors that are accessible or can be made accessible using {@link AccessibleObject#trySetAccessible()}
731+ * are included in the search. If multiple constructors have the same number of matching and mismatching
732+ * properties, the first constructor that is accessible by default is selected.
733+ * <p>
734+ * The search finishes as soon as a constructor that is accessible by default and matches all properties is found.
735+ * Otherwise, it finishes once all constructors have been visited.
729736 * <p>
730737 * At least 1 property match must be present for mapping to work.
731738 * <p>
You can’t perform that action at this time.
0 commit comments