Skip to content

Commit

Permalink
clean up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bbottema committed Jan 13, 2023
1 parent f4c133a commit dce2a26
Show file tree
Hide file tree
Showing 43 changed files with 73 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.simplejavamail.internal.authenticatedsockssupport;

import org.jetbrains.annotations.NotNull;
import org.simplejavamail.api.internal.authenticatedsockssupport.socks5server.AnonymousSocks5Server;
import org.simplejavamail.api.mailer.config.ProxyConfig;
import org.simplejavamail.internal.authenticatedsockssupport.socks5server.AnonymousSocks5ServerImpl;
import org.simplejavamail.internal.modules.AuthenticatedSocksModule;

import org.jetbrains.annotations.NotNull;

import static org.simplejavamail.internal.util.Preconditions.checkNonEmptyArgument;

@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.simplejavamail.internal.authenticatedsockssupport;

import org.simplejavamail.api.mailer.config.ProxyConfig;
import org.jetbrains.annotations.NotNull;
import org.simplejavamail.api.internal.authenticatedsockssupport.common.Socks5Bridge;
import org.simplejavamail.api.mailer.config.ProxyConfig;
import org.simplejavamail.internal.authenticatedsockssupport.socks5client.ProxyCredentials;
import org.simplejavamail.internal.authenticatedsockssupport.socks5client.Socks5;
import org.simplejavamail.internal.authenticatedsockssupport.socks5client.SocksSocket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.simplejavamail.internal.authenticatedsockssupport.socks5client;

import org.jetbrains.annotations.NotNull;
import org.simplejavamail.internal.util.MiscUtil;
import org.simplejavamail.internal.authenticatedsockssupport.common.SocksException;
import org.simplejavamail.internal.util.MiscUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.simplejavamail.internal.batchsupport.concurrent;

import org.jetbrains.annotations.NotNull;

import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import org.bbottema.javareflection.valueconverter.IncompatibleTypeException;
import org.bbottema.javareflection.valueconverter.ValueConversionHelper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.simplejavamail.api.internal.clisupport.model.CliCommandType;
import org.simplejavamail.api.internal.clisupport.model.CliDeclaredOptionSpec;
import org.simplejavamail.api.internal.clisupport.model.CliReceivedCommand;
Expand All @@ -11,8 +13,6 @@
import picocli.CommandLine.Model.OptionSpec;
import picocli.CommandLine.ParseResult;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.simplejavamail.internal.clisupport;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import picocli.CommandLine;
import picocli.CommandLine.Help;
import picocli.CommandLine.Help.Ansi;
Expand All @@ -8,9 +10,6 @@
import picocli.CommandLine.Model.CommandSpec;
import picocli.CommandLine.Model.OptionSpec;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import static java.lang.String.format;
import static java.lang.System.err;
import static java.lang.System.out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import org.bbottema.javareflection.ReflectionUtils;
import org.bbottema.javareflection.valueconverter.IncompatibleTypeException;
import org.bbottema.javareflection.valueconverter.ValueFunction;
import org.jetbrains.annotations.NotNull;
import org.simplejavamail.MailException;
import org.slf4j.Logger;

import org.jetbrains.annotations.NotNull;
import java.io.File;

import static org.slf4j.LoggerFactory.getLogger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.simplejavamail.internal.clisupport.valueinterpreters;

import org.bbottema.javareflection.valueconverter.IncompatibleTypeException;
import org.jetbrains.annotations.NotNull;
import org.simplejavamail.internal.util.CertificationUtil;

import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.FileNotFoundException;
import java.security.NoSuchProviderException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.simplejavamail.internal.clisupport.valueinterpreters;

import org.jetbrains.annotations.NotNull;

import java.io.File;

public class StringToFileFunction extends FileBasedFunction<File> {
Expand Down
2 changes: 1 addition & 1 deletion modules/cli-module/src/test/java/demo/CliDemoApp.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package demo;

import org.simplejavamail.internal.clisupport.CliSupport;
import org.simplejavamail.api.mailer.config.ServerConfig;
import org.simplejavamail.internal.clisupport.CliSupport;
import testutil.ModuleLoaderTestHelper;

import static demo.ResourceFolderHelper.determineResourceFolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.simplejavamail.internal.clisupport.BuilderApiToPicocliCommandsMapper.colorizeOptionsInText;
import static org.simplejavamail.api.internal.clisupport.model.CliBuilderApiType.EMAIL;
import static org.simplejavamail.api.internal.clisupport.model.CliBuilderApiType.MAILER;
import static org.simplejavamail.internal.clisupport.BuilderApiToPicocliCommandsMapper.colorizeOptionsInText;

public class CliBuilderApiTypeTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import org.bbottema.javareflection.ClassUtils;
import org.bbottema.javareflection.model.MethodModifier;
import org.jetbrains.annotations.Nullable;
import org.junit.Test;

import org.jetbrains.annotations.Nullable;
import java.lang.reflect.Method;
import java.util.ArrayList;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.simplejavamail.internal.clisupport;

import org.jetbrains.annotations.NotNull;
import org.junit.Test;
import org.simplejavamail.api.internal.clisupport.model.CliDeclaredOptionSpec;

import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;

import static java.lang.Boolean.TRUE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;

import static java.util.regex.Pattern.compile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.simplejavamail.api.internal.clisupport.model;

import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.simplejavamail.api.internal.outlooksupport.model;

import org.jetbrains.annotations.Nullable;

import java.util.Date;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.simplejavamail.api.mailer.config;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.simplejavamail.api.mailer.CustomMailer;
import org.simplejavamail.api.mailer.Mailer;
import org.simplejavamail.api.mailer.MailerGenericBuilder;
import org.simplejavamail.api.mailer.MailerRegularBuilder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Properties;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package org.simplejavamail.internal.modules;

import org.jetbrains.annotations.NotNull;
import org.simplejavamail.api.internal.authenticatedsockssupport.socks5server.AnonymousSocks5Server;
import org.simplejavamail.api.mailer.config.ProxyConfig;

import org.jetbrains.annotations.NotNull;

public interface AuthenticatedSocksModule {

String NAME = "Authenticated socks module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.simplejavamail.internal.util;

import org.jetbrains.annotations.NotNull;
import org.simplejavamail.MailException;

import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.simplejavamail.internal.dkimsupport;

import org.simplejavamail.MailException;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.simplejavamail.MailException;

import static org.simplejavamail.internal.util.Preconditions.checkNonEmptyArgument;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.simplejavamail.internal.outlooksupport.converter;

import org.simplejavamail.MailException;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.simplejavamail.MailException;

import static org.simplejavamail.internal.util.Preconditions.checkNonEmptyArgument;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.simplejavamail.internal.outlooksupport.internal.model;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.simplejavamail.api.internal.outlooksupport.model.OutlookAttachment;
import org.simplejavamail.api.internal.outlooksupport.model.OutlookFileAttachment;
import org.simplejavamail.api.internal.outlooksupport.model.OutlookMessage;
Expand All @@ -9,16 +11,16 @@
import org.simplejavamail.outlookmessageparser.model.OutlookSmime.OutlookSmimeApplicationSmime;
import org.simplejavamail.outlookmessageparser.model.OutlookSmime.OutlookSmimeMultipartSigned;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static org.simplejavamail.internal.outlooksupport.internal.model.OutlookSmimeProxy.*;
import static org.simplejavamail.internal.outlooksupport.internal.model.OutlookSmimeProxy.OutlookSmimeApplicationOctetStreamProxy;
import static org.simplejavamail.internal.outlooksupport.internal.model.OutlookSmimeProxy.OutlookSmimeApplicationSmimeProxy;
import static org.simplejavamail.internal.outlooksupport.internal.model.OutlookSmimeProxy.OutlookSmimeMultipartSignedProxy;

/**
* @see OutlookMessage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.simplejavamail.internal.outlooksupport.internal.model;

import org.simplejavamail.api.internal.outlooksupport.model.OutlookSmime;

import org.jetbrains.annotations.Nullable;
import org.simplejavamail.api.internal.outlooksupport.model.OutlookSmime;

public abstract class OutlookSmimeProxy<T extends org.simplejavamail.outlookmessageparser.model.OutlookSmime> implements OutlookSmime {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.simplejavamail.api.email.OriginalSmimeDetails.SmimeMode.PLAIN;
import static org.simplejavamail.internal.moduleloader.ModuleLoader.loadSmimeModule;
import static org.simplejavamail.internal.util.MiscUtil.*;
import static org.simplejavamail.internal.util.MiscUtil.extractCID;
import static org.simplejavamail.internal.util.MiscUtil.readInputStreamToString;
import static org.simplejavamail.internal.util.MiscUtil.valueNullOrEmpty;
import static org.simplejavamail.internal.util.Preconditions.checkNonEmptyArgument;
import static org.simplejavamail.internal.util.Preconditions.verifyNonnullOrEmpty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@

import static java.lang.Boolean.TRUE;
import static java.lang.String.format;
import static org.simplejavamail.internal.util.MiscUtil.*;
import static org.simplejavamail.internal.util.MiscUtil.orOther;
import static org.simplejavamail.internal.util.MiscUtil.orOtherList;
import static org.simplejavamail.internal.util.MiscUtil.valueNullOrEmpty;
import static org.simplejavamail.internal.util.Preconditions.checkNonEmptyArgument;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
import java.util.Date;

import static java.util.Optional.ofNullable;
import static org.simplejavamail.internal.util.MiscUtil.*;
import static org.simplejavamail.internal.util.MiscUtil.checkArgumentNotEmpty;
import static org.simplejavamail.internal.util.MiscUtil.orOther;
import static org.simplejavamail.internal.util.MiscUtil.valueNullOrEmpty;

/**
* Helper class that produces and populates a mime messages. Deals with jakarta.mail RFC MimeMessage stuff, as well as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* This interface is only there to improve readability there where internal builder API is used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import java.util.Collection;
import java.util.Map;
import java.util.Set;

import static java.lang.Boolean.TRUE;
import static java.lang.String.format;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,24 @@
import java.util.concurrent.Executors;

import static java.lang.String.format;
import static org.simplejavamail.config.ConfigLoader.*;
import static org.simplejavamail.config.ConfigLoader.Property.*;
import static org.simplejavamail.internal.util.MiscUtil.*;
import static org.simplejavamail.config.ConfigLoader.Property;
import static org.simplejavamail.config.ConfigLoader.Property.DEFAULT_CONNECTIONPOOL_CLUSTER_KEY;
import static org.simplejavamail.config.ConfigLoader.Property.PROXY_HOST;
import static org.simplejavamail.config.ConfigLoader.Property.PROXY_PASSWORD;
import static org.simplejavamail.config.ConfigLoader.Property.PROXY_USERNAME;
import static org.simplejavamail.config.ConfigLoader.Property.SMIME_SIGNING_KEYSTORE;
import static org.simplejavamail.config.ConfigLoader.Property.SMIME_SIGNING_KEYSTORE_PASSWORD;
import static org.simplejavamail.config.ConfigLoader.Property.SMIME_SIGNING_KEY_ALIAS;
import static org.simplejavamail.config.ConfigLoader.Property.SMIME_SIGNING_KEY_PASSWORD;
import static org.simplejavamail.config.ConfigLoader.getStringProperty;
import static org.simplejavamail.config.ConfigLoader.hasProperty;
import static org.simplejavamail.config.ConfigLoader.valueOrProperty;
import static org.simplejavamail.config.ConfigLoader.valueOrPropertyAsBoolean;
import static org.simplejavamail.config.ConfigLoader.valueOrPropertyAsInteger;
import static org.simplejavamail.config.ConfigLoader.valueOrPropertyAsString;
import static org.simplejavamail.internal.util.MiscUtil.checkArgumentNotEmpty;
import static org.simplejavamail.internal.util.MiscUtil.readInputStreamToBytes;
import static org.simplejavamail.internal.util.MiscUtil.valueNullOrEmpty;
import static org.simplejavamail.internal.util.Preconditions.checkNonEmptyArgument;
import static org.simplejavamail.internal.util.Preconditions.verifyNonnullOrEmpty;
import static org.simplejavamail.mailer.internal.MailerException.ERROR_READING_FROM_FILE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.simplejavamail.api.mailer.config.ProxyConfig;

import org.jetbrains.annotations.Nullable;
import org.simplejavamail.api.mailer.config.ProxyConfig;

import static java.lang.String.format;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.simplejavamail.mailer.internal;

import org.simplejavamail.api.mailer.config.ServerConfig;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.simplejavamail.api.mailer.config.ServerConfig;

import javax.net.ssl.SSLSocketFactory;

Expand Down
Loading

0 comments on commit dce2a26

Please sign in to comment.