11package com .github .lppedd .cc .configuration ;
22
33import static com .intellij .uiDesigner .core .GridConstraints .*;
4- import static org .apache .commons .validator .routines .UrlValidator .NO_FRAGMENTS ;
54
65import java .awt .*;
76import java .util .Map ;
87
98import javax .swing .*;
109
11- import org .apache .commons .validator .routines .UrlValidator ;
1210import org .jetbrains .annotations .NotNull ;
1311import org .jetbrains .annotations .Nullable ;
1412
@@ -235,7 +233,7 @@ private void finishUpComponents(
235233 private HyperlinkLabel buildTranslatorLabel () {
236234 final var name = CCBundle .getOrDefault ("cc.translation.translator.name" , "" );
237235
238- if (name .isEmpty ()) {
236+ if (name .isBlank ()) {
239237 return null ;
240238 }
241239
@@ -245,16 +243,12 @@ private HyperlinkLabel buildTranslatorLabel() {
245243
246244 final var url = CCBundle .getOrDefault ("cc.translation.translator.url" , "" );
247245
248- if (url .isEmpty ()) {
246+ if (url .isBlank ()) {
249247 label .setText (CCBundle .get ("cc.translation.text" ) + " " + name );
250248 } else {
251- if (new UrlValidator (new String [] {"http" , "https" }, NO_FRAGMENTS ).isValid (url )) {
252- final var hyperlink = "<hyperlink>" + name + "</hyperlink>" ;
253- label .setTextWithHyperlink (CCBundle .get ("cc.translation.text" ) + " " + hyperlink );
254- label .setHyperlinkTarget (url );
255- } else {
256- label .setText (CCBundle .get ("cc.translation.text" ) + " " + name );
257- }
249+ final var hyperlink = "<hyperlink>" + name + "</hyperlink>" ;
250+ label .setTextWithHyperlink (CCBundle .get ("cc.translation.text" ) + " " + hyperlink );
251+ label .setHyperlinkTarget (url );
258252 }
259253
260254 // Keep this here or it will be overwritten
0 commit comments