| 1 | /* | |
| 2 | MailClena - Copyright (C) 2018, Aiki IT | |
| 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | |
| 5 | it under the terms of the GNU General Public License as published by | |
| 6 | the Free Software Foundation, either version 3 of the License, or | |
| 7 | (at your option) any later version. | |
| 8 | ||
| 9 | This program is distributed in the hope that it will be useful, | |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 | GNU General Public License for more details. | |
| 13 | ||
| 14 | You should have received a copy of the GNU General Public License | |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 16 | ||
| 17 | */ | |
| 18 | package de.aikiit.mailclena; | |
| 19 | ||
| 20 | import de.aikiit.mailclena.mail.MailClient; | |
| 21 | import lombok.AccessLevel; | |
| 22 | import lombok.NoArgsConstructor; | |
| 23 | import lombok.extern.log4j.Log4j2; | |
| 24 | ||
| 25 | import java.util.Optional; | |
| 26 | ||
| 27 | /** | |
| 28 | * Main application, startable with command line parameters - see documentation/README for details and examples. | |
| 29 | */ | |
| 30 | @Log4j2 | |
| 31 | @NoArgsConstructor(access = AccessLevel.PRIVATE) | |
| 32 | public final class MailClena { | |
| 33 | ||
| 34 | /** | |
| 35 | * Launch the application with the given configuration options. | |
| 36 | * @param args command line arguments. | |
| 37 | */ | |
| 38 | public static void main(String... args) { | |
| 39 | Optional<MailConfiguration> mailConfiguration = new MailClenaParameterParser().extractConfiguration(args); | |
| 40 | ||
| 41 |
1
1. main : negated conditional → KILLED |
if (mailConfiguration.isPresent()) { |
| 42 | log.info("MailClena is launching with the given configuration ...."); | |
| 43 | final MailConfiguration configuration = mailConfiguration.get(); | |
| 44 | final MailClient client = new MailClient(configuration); | |
| 45 |
1
1. main : removed call to de/aikiit/mailclena/mail/MailClient::execute → SURVIVED |
client.execute(configuration.getCommand()); |
| 46 | } | |
| 47 | log.info("MailClena is shutting down .... bye bye :-)"); | |
| 48 | } | |
| 49 | ||
| 50 | } | |
Mutations | ||
| 41 |
1.1 |
|
| 45 |
1.1 |