| 1 | package com.jsql.view.swing.action; | |
| 2 | ||
| 3 | import com.jsql.util.GitUtil.ShowOnConsole; | |
| 4 | import com.jsql.util.I18nUtil; | |
| 5 | import com.jsql.util.LogLevelUtil; | |
| 6 | import com.jsql.view.swing.util.MediatorHelper; | |
| 7 | import org.apache.logging.log4j.LogManager; | |
| 8 | import org.apache.logging.log4j.Logger; | |
| 9 | ||
| 10 | import java.awt.event.ActionEvent; | |
| 11 | import java.awt.event.ActionListener; | |
| 12 | ||
| 13 | /** | |
| 14 | * Action performing an IP localization test. | |
| 15 | */ | |
| 16 | public class ActionCheckIp implements ActionListener, Runnable { | |
| 17 | | |
| 18 | private static final Logger LOGGER = LogManager.getRootLogger(); | |
| 19 | ||
| 20 | @Override | |
| 21 | public void actionPerformed(ActionEvent e) { | |
| 22 |
1
1. actionPerformed : removed call to java/lang/Thread::start → NO_COVERAGE |
new Thread(this, "ThreadCheckIP").start(); |
| 23 | } | |
| 24 | ||
| 25 | @Override | |
| 26 | public void run() { | |
| 27 |
1
1. run : negated conditional → NO_COVERAGE |
if (MediatorHelper.model().getMediatorUtils().getProxyUtil().isNotLive(ShowOnConsole.YES)) { |
| 28 | return; | |
| 29 | } | |
| 30 | LOGGER.log(LogLevelUtil.CONSOLE_DEFAULT, () -> I18nUtil.valueByKey("LOG_IP_ADDRESS_CHECK")); | |
| 31 | String addressIp = MediatorHelper.model().getMediatorUtils().getConnectionUtil().getSource("http://checkip.amazonaws.com"); | |
| 32 | LOGGER.log( | |
| 33 | LogLevelUtil.CONSOLE_INFORM, | |
| 34 | "{} {}", | |
| 35 |
1
1. lambda$run$1 : replaced return value with null for com/jsql/view/swing/action/ActionCheckIp::lambda$run$1 → NO_COVERAGE |
() -> I18nUtil.valueByKey("LOG_IP_ADDRESS_IS"), |
| 36 |
1
1. lambda$run$2 : replaced return value with null for com/jsql/view/swing/action/ActionCheckIp::lambda$run$2 → NO_COVERAGE |
() -> addressIp |
| 37 | ); | |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 22 |
1.1 |
|
| 27 |
1.1 |
|
| 35 |
1.1 |
|
| 36 |
1.1 |