Skip to content

Commit bb3c006

Browse files
committed
Polishing.
Fix PersistenceConstructor of Completion to accept the property type String[]. See #1675.
1 parent 877de9c commit bb3c006

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Diff for: src/main/java/org/springframework/data/elasticsearch/core/completion/Completion.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public class Completion {
2020
@Nullable private Map<String, List<String>> contexts;
2121
@Nullable private Integer weight;
2222

23+
@PersistenceConstructor
2324
public Completion(String[] input) {
2425
this.input = input;
2526
}
2627

27-
@PersistenceConstructor
2828
public Completion(List<String> input) {
2929
this.input = input.toArray(new String[0]);
3030
}

Diff for: src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterUnitTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ public void init() {
211211
shotGunAsMap.put("_class", ShotGun.class.getName());
212212

213213
notificationAsMap = Document.create();
214-
notificationAsMap.put("_class", Notification.class.getName());
215214
notificationAsMap.put("id", 1L);
216215
notificationAsMap.put("fromEmail", "[email protected]");
217216
notificationAsMap.put("toEmail", "[email protected]");

0 commit comments

Comments
 (0)