Skip to content

Commit 4921d9f

Browse files
authored
Fix all Checkstyle violations (#16)
* docs: fix all Javadoc warnings from Checkstyle * fix: add braces to single-statement if blocks * fix: AvoidEscapedUnicodeCharacters Checkstyle * fix: wrap long lines in license headers Checkstyle ignores URLs when enforcing line length, so this previously passed. A prior commit reformatted the headers but missed the GPL notice block, which is now wrapped correctly. * fix: wrap long string literals to comply with line length limit * refactor: replace wildcard imports with explicit imports * refactor: move variable declarations closer to their first usage * refactor: rename parameter from bEditable to editable in setEditable methods * refactor: rename invalidIpAddressException to InvalidIpAddressException * refactor: rename ipAddressValidator to IpAddressValidator * style: standardize TODO comment format with colon separator * refactor: rename EPPuplink to EppUplink * refactor: rename EPPthread to EppThread and remove unused imports * refactor: rename EPPthread field to eppThread for consistent naming * refactor: rename EPPuplink field to eppUplink for consistent naming * feat: add logging for exception handling in DbExporter * refactor: rename GUI components and improve code style in MessageManagement and MessageDetail * refactor: rename EPPparams to EppParams for consistent Java naming conventions * refactor: improve variable naming and code style in ContactSelection and AddressPanel2 * refactor: rename GUI components in TxtImport and improve code style * refactor: standardize variable naming and rename generic GUI components * refactor: rename ManageParameters form file and standardize component names * Add detailed logging for exception handling across application * fix: add missing break statements and default cases in switch blocks * refactor: resolving all the remaining Checkstyle violations * refactor: fix comment punctuation in ContactsManagement * refactor: remove unused panel and rename chkDnssec to chkDnsSec for consistent naming
1 parent f9278bf commit 4921d9f

64 files changed

Lines changed: 2796 additions & 1488 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ All source files in this project must begin with the following license preamble:
2525
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2626
* General Public License for more details.
2727
*
28-
* You should have received a copy of the GNU General Public License along with EPPClient. If not, see <https://www.gnu.org/licenses/>.
28+
* You should have received a copy of the GNU General Public License along with EPPClient.
29+
* If not, see <https://www.gnu.org/licenses/>.
2930
*/
3031
```
3132

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'java'
66
id 'application'
77
id 'com.gradleup.shadow' version '9.3.1'
8-
id "pl.allegro.tech.build.axion-release" version "1.20.1"
8+
id 'pl.allegro.tech.build.axion-release' version '1.20.1'
99
id 'com.diffplug.spotless' version '8.3.0'
1010
id 'checkstyle'
1111
}
@@ -49,7 +49,7 @@ test {
4949
}
5050

5151
application {
52-
mainClass = 'com.codetotime.eppclient.main'
52+
mainClass = 'com.codetotime.eppclient.Main'
5353
}
5454

5555
// ShadowJar configuration (fat jar)
@@ -82,6 +82,10 @@ tasks.register('generateBuildInfo') {
8282
def outputFile = file("$outputDir/BuildInfo.java")
8383
outputFile.text = """package com.codetotime.eppclient;
8484
85+
/**
86+
* Build-time metadata injected by Gradle: version string, build date, and registrar-specific fields
87+
* (company, VAT number, tag, order).
88+
*/
8589
public class BuildInfo {
8690
public static final String BUILD_VERSION = "$buildVersion";
8791
public static final String BUILD_DATE = "$date";

src/main/java/com/codetotime/eppclient/CustomLogin.java

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,46 @@
1313
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU General Public License along with EPPClient. If not, see <https://www.gnu.org/licenses/>.
16+
* You should have received a copy of the GNU General Public License along with EPPClient.If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

1919
package com.codetotime.eppclient;
2020

21-
import com.codetotime.eppclient.config.EPPparams;
21+
import com.codetotime.eppclient.config.EppParams;
2222
import it.nic.epp.client.commands.session.Login;
2323

24+
/**
25+
* Extends {@link Login} to apply the DNSSec system properties from application parameters before
26+
* the EPP session is established.
27+
*/
2428
public class CustomLogin extends Login {
2529

2630
static {
27-
configureDNSSEC();
31+
configureDnssec();
2832
}
2933

34+
/** Creates a login command using the default credentials from application parameters. */
3035
public CustomLogin() {
3136
super();
3237
}
3338

39+
/**
40+
* Creates a login command with explicit credentials.
41+
*
42+
* @param clID the registrar client ID
43+
* @param pw the password
44+
*/
45+
@SuppressWarnings("checkstyle:AbbreviationAsWordInName")
3446
public CustomLogin(String clID, String pw) {
3547
super(clID, pw);
3648
}
3749

38-
private static void configureDNSSEC() {
39-
String dnssecEnabled = EPPparams.getParameter("EppClient.implement.DNSSEC");
50+
private static void configureDnssec() {
51+
String dnssecEnabled = EppParams.getParameter("EppClient.implement.DNSSEC");
4052

41-
boolean isDNSSECEnabled = Boolean.parseBoolean(dnssecEnabled);
53+
boolean isDnssecEnabled = Boolean.parseBoolean(dnssecEnabled);
4254

43-
System.setProperty("EppClient.implement.secDNS", String.valueOf(isDNSSECEnabled));
44-
System.setProperty("EppClient.implement.extsecDNS", String.valueOf(isDNSSECEnabled));
55+
System.setProperty("EppClient.implement.secDNS", String.valueOf(isDnssecEnabled));
56+
System.setProperty("EppClient.implement.extsecDNS", String.valueOf(isDnssecEnabled));
4557
}
4658
}

src/main/java/com/codetotime/eppclient/ErrorHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1313
* General Public License for more details.
1414
*
15-
* You should have received a copy of the GNU General Public License along with EPPClient. If not, see <https://www.gnu.org/licenses/>.
15+
* You should have received a copy of the GNU General Public License along with EPPClient.
16+
* If not, see <https://www.gnu.org/licenses/>.
1617
*/
1718

1819
package com.codetotime.eppclient;

src/main/java/com/codetotime/eppclient/InfoDialog.java

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,33 @@
1313
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU General Public License along with EPPClient. If not, see <https://www.gnu.org/licenses/>.
16+
* You should have received a copy of the GNU General Public License along with EPPClient.
17+
* If not, see <https://www.gnu.org/licenses/>.
1718
*/
1819

1920
package com.codetotime.eppclient;
2021

21-
import java.awt.*;
22-
import javax.swing.*;
23-
import javax.swing.border.*;
22+
import java.awt.BorderLayout;
23+
import java.awt.Color;
24+
import java.awt.FlowLayout;
25+
import java.awt.Font;
26+
import java.awt.Frame;
27+
import javax.swing.JButton;
28+
import javax.swing.JDialog;
29+
import javax.swing.JPanel;
30+
import javax.swing.JScrollPane;
31+
import javax.swing.JTextArea;
32+
import javax.swing.border.EmptyBorder;
33+
import javax.swing.border.LineBorder;
2434

35+
/** Modal dialog showing build-time info: company, VAT number, registrar tag and build date. */
2536
public class InfoDialog {
2637

38+
/**
39+
* Opens the build info dialog, modal over the given parent frame.
40+
*
41+
* @param parent the parent frame used to centre the dialog
42+
*/
2743
public static void show(Frame parent) {
2844

2945
JDialog dialog = new JDialog(parent, "EPP Client - Informazioni compilazione", true);
@@ -78,9 +94,11 @@ private static String buildText() {
7894
+ "Il richiedente ha certificato quanto segue:\n\n"
7995
+ "1) Di essere un Registrar accreditato presso il Registro .it (NIC.it).\n"
8096
+ "2) Di essere autorizzato all'utilizzo della libreria EPP del Registro .it.\n"
81-
+ "3) Di aver verificato il codice del software EPP Client e di accettarlo nello stato in cui viene fornito (\"AS IS\").\n"
97+
+ "3) Di aver verificato il codice del software EPP Client e di accettarlo nello stato\n"
98+
+ "in cui viene fornito (\"AS IS\").\n"
8299
+ "----------------------------------------\n"
83-
+ "Le dichiarazioni sopra riportate sono rese sotto la piena responsabilità del richiedente.\n\n"
100+
+ "Le dichiarazioni sopra riportate sono rese sotto la piena responsabilità del\n"
101+
+ "richiedente.\n\n"
84102
+ "Il software è fornito senza garanzie di alcun tipo.";
85103
}
86104
}

0 commit comments

Comments
 (0)