Skip to content

Commit 31809b4

Browse files
committed
update
1 parent 6045e2e commit 31809b4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

driver/src/main/java/org/neo4j/driver/Value.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.neo4j.driver;
1818

19+
import java.lang.reflect.AccessibleObject;
1920
import java.time.DateTimeException;
2021
import java.time.LocalDate;
2122
import 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>

0 commit comments

Comments
 (0)