-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…escription for attachments
- Loading branch information
Showing
17 changed files
with
439 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
...core-module/src/main/java/org/simplejavamail/internal/util/NaturalEntryKeyComparator.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeDataSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.simplejavamail.converter.internal.mimemessage; | ||
|
||
import jakarta.activation.DataSource; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.Objects; | ||
|
||
@Getter | ||
@Builder | ||
public class MimeDataSource implements Comparable<MimeDataSource> { | ||
private final String name; | ||
private final DataSource dataSource; | ||
@Nullable private final String contentDescription; | ||
@Nullable private final String contentTransferEncoding; | ||
|
||
@Override | ||
public int compareTo(@NotNull final MimeDataSource o) { | ||
int keyComparison = getName().compareTo(o.getName()); | ||
if (keyComparison != 0) { | ||
return keyComparison; | ||
} | ||
return Integer.compare(getDataSource().hashCode(), o.getDataSource().hashCode()); | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
return this == o || | ||
(o instanceof MimeDataSource && compareTo((MimeDataSource) o) == 0); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(name, dataSource); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.