Skip to content

Commit

Permalink
add lots of @return to the data fields because Lombok fails at doing so
Browse files Browse the repository at this point in the history
in an attempt to fix projectlombok/lombok#2502
and its follow-up warnings

careful to not trigger projectlombok/lombok#2443
  • Loading branch information
mirabilos committed Jan 12, 2021
1 parent 59062f8 commit 7793ee8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/main/java/org/evolvis/tartools/rfc822/Path.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ public String toString()
@Getter
protected final class AddrSpecSIDE extends Substring {

/**
* Whether this addr-spec side is actually valid or merely parses
* but fails further validations (length limits, semantics, etc.)
*
* @return true if valid, false otherwise
*/
private final boolean valid;

private AddrSpecSIDE(final Substring src, final String us, final boolean v)
Expand Down Expand Up @@ -336,6 +342,8 @@ public static final class AddrSpec implements ParserResult {
* The local-part of the addr-spec, as it occurs in the addr-spec,
* i.e. dot-atom or quoted-string in their wire representation;
* the parsed string content is available as String getData()
*
* @return local-part of the addr-spec as {@link Substring}
*/
@NonNull
final Substring localPart;
Expand All @@ -345,6 +353,8 @@ public static final class AddrSpec implements ParserResult {
* or one of two forms of domain-literal: [192.0.2.1] for Legacy IP,
* [IPv6:2001:DB8:CAFE:1::1] for IP addresses; getData() contains
* either the domain as String or the IP address as {@link InetAddress}
*
* @return domain of the addr-spec as {@link Substring}
*/
@NonNull
final Substring domain;
Expand All @@ -353,6 +363,8 @@ public static final class AddrSpec implements ParserResult {
* Whether this addr-spec is actually valid according to DNS, SMTP,
* etc. (true) or merely parses as RFC822 addr-spec (false) and fails
* further validation (length limits, FQDN label syntax, etc.)
*
* @return true if valid, false otherwise
*/
final boolean valid;

Expand Down Expand Up @@ -380,6 +392,8 @@ public static final class Address implements ParserResult {

/**
* Whether this address is a group (true) or a mailbox (false)
*
* @return true if a group, false if a mailbox
*/
final boolean group;

Expand All @@ -390,21 +404,29 @@ public static final class Address implements ParserResult {
* (in [@link UXAddress] cases, {@link Substring#toString()} (the
* “wire form”) may be empty whereas {@link Substring#getData()}
* can return the value the user provided)
*
* @return display-name as {@link Substring}
*/
final Substring label;

/**
* The addr-spec behind this mailbox [isGroup()==false]
*
* @return addr-spec as {@link AddrSpec}
*/
final AddrSpec mailbox;

/**
* The group-list behind this group [isGroup()==true], may be empty
*
* @return group-list as {@link List} of {@link Address}
*/
final List<Address> mailboxen;

/**
* Whether all constituents are valid
*
* @return true if valid, false otherwise
*/
final boolean valid;

Expand Down Expand Up @@ -463,18 +485,24 @@ public static final class AddressList implements ParserResult {
* The actual address-list or mailbox-list behind the scenes
* (which one it is depends on by which parser function this
* object was returned)
*
* @return address-list / mailbox-list as {@link List} of {@link Address}
*/
final List<Address> addresses;

/**
* Whether all constituents are valid
*
* @return true if valid, false otherwise
*/
final boolean valid;

/**
* Whether this is definitely an address-list (group addresses are
* present); note that if this is false, it may be either a mailbox-list
* or an address-list whose address members are all mailbox)
*
* @return true if group {@link Address}es are present
*/
@SuppressWarnings("squid:S1700")
final boolean addressList;
Expand Down

0 comments on commit 7793ee8

Please sign in to comment.