From 55293b4ac33e0f4fd2bfce3a0f5783b42812a65c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 21 Dec 2022 02:17:29 +0300 Subject: webfinger, app-site-associations: adopt records --- .../com/juick/www/api/webfinger/model/Account.java | 22 ++------------- .../com/juick/www/api/webfinger/model/Link.java | 31 ++-------------------- 2 files changed, 4 insertions(+), 49 deletions(-) (limited to 'src/main/java/com/juick/www/api/webfinger/model') diff --git a/src/main/java/com/juick/www/api/webfinger/model/Account.java b/src/main/java/com/juick/www/api/webfinger/model/Account.java index e0ca5fe9..6dafa7a4 100644 --- a/src/main/java/com/juick/www/api/webfinger/model/Account.java +++ b/src/main/java/com/juick/www/api/webfinger/model/Account.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020, Juick + * Copyright (C) 2008-2022, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -19,23 +19,5 @@ package com.juick.www.api.webfinger.model; import java.util.List; -public class Account { - private String subject; - private List links; - - public String getSubject() { - return subject; - } - - public void setSubject(String subject) { - this.subject = subject; - } - - public List getLinks() { - return links; - } - - public void setLinks(List links) { - this.links = links; - } +public record Account (String subject, List links) { } diff --git a/src/main/java/com/juick/www/api/webfinger/model/Link.java b/src/main/java/com/juick/www/api/webfinger/model/Link.java index 1036d43c..696ccd6d 100644 --- a/src/main/java/com/juick/www/api/webfinger/model/Link.java +++ b/src/main/java/com/juick/www/api/webfinger/model/Link.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020, Juick + * Copyright (C) 2008-2022, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,32 +17,5 @@ package com.juick.www.api.webfinger.model; -public class Link { - private String rel; - private String type; - private String href; - - public String getRel() { - return rel; - } - - public void setRel(String rel) { - this.rel = rel; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } +public record Link(String rel, String type, String href) { } -- cgit v1.2.3