Fix Kotlin examples in the reference manual

This commit fixes the following issues in the reference manual.

- Remove the dangling opening brace from the Kotlin `PlaceOfBirth`
  example in example-classes.adoc.
- Use `JsonView::class.java.name` instead of
  `JsonView::class.qualifiedName` in the Kotlin examples in
  jackson.adoc, since `qualifiedName` is nullable whereas
  `Model#set()` does not accept a null key.
- Remove unnecessary semicolons after the empty interface bodies in the
  Java examples in jackson.adoc.

Closes gh-37101

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
Tran Ngoc Nhan
2026-10-06 15:48:32 +02:00
committed by GitHub
parent 2e478e52d8
commit 3709672494
3 changed files with 6 additions and 6 deletions
@@ -145,7 +145,7 @@ Kotlin::
----
package org.spring.samples.spel.inventor
class PlaceOfBirth(var city: String, var country: String? = null) {
class PlaceOfBirth(var city: String, var country: String? = null)
----
======
@@ -32,8 +32,8 @@ Java::
public class User {
public interface WithoutPasswordView {};
public interface WithPasswordView extends WithoutPasswordView {};
public interface WithoutPasswordView {}
public interface WithPasswordView extends WithoutPasswordView {}
private String username;
private String password;
@@ -31,8 +31,8 @@ Java::
public class User {
public interface WithoutPasswordView {};
public interface WithPasswordView extends WithoutPasswordView {};
public interface WithoutPasswordView {}
public interface WithPasswordView extends WithoutPasswordView {}
private String username;
private String password;
@@ -152,7 +152,7 @@ Kotlin::
@GetMapping("/user")
fun getUser(model: Model): String {
model["user"] = User("eric", "7!jd#h23")
model[JsonView::class.qualifiedName] = User.WithoutPasswordView::class.java
model[JsonView::class.java.name] = User.WithoutPasswordView::class.java
return "userView"
}
}