Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-04-15 13:32:48 -07:00
parent 25b94487ad
commit 60d15e253e
3 changed files with 7 additions and 9 deletions

View file

@ -49,7 +49,7 @@ public class Mask implements ValueRenderer {
mask = properties.getProperty("mask", mask); mask = properties.getProperty("mask", mask);
try { try {
unmasked = Integer.parseInt(properties.getProperty("unmasked", "0")); unmasked = Integer.parseInt(properties.getProperty("unmasked", "0"));
} catch (NumberFormatException ignore) { } catch (NumberFormatException ignored) {
// do nothing // do nothing
} }
fromStart = "true".equalsIgnoreCase(properties.getProperty("fromStart", "false")); fromStart = "true".equalsIgnoreCase(properties.getProperty("fromStart", "false"));

View file

@ -230,7 +230,7 @@ public final class RenderUtils {
LOGGER.log(Level.WARNING, "An IO error occurred while connecting to " + fetchUrl.getHost(), ioe); LOGGER.log(Level.WARNING, "An IO error occurred while connecting to " + fetchUrl.getHost(), ioe);
} }
} }
} catch (MalformedURLException ignore) { } catch (MalformedURLException ignored) {
// do nothing // do nothing
} }
return defaultContent; return defaultContent;
@ -340,7 +340,7 @@ public final class RenderUtils {
sb.append('-'); sb.append('-');
} else { } else {
space = false; space = false;
if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z')) { if (c >= '0' && c <= '9' || c >= 'a' && c <= 'z') {
sb.append(c); sb.append(c);
} else if (c >= 'A' && c <= 'Z') { } else if (c >= 'A' && c <= 'Z') {
sb.append((char) (c + 32)); // lowercase sb.append((char) (c + 32)); // lowercase
@ -362,7 +362,7 @@ public final class RenderUtils {
if (src != null && !src.isBlank()) { if (src != null && !src.isBlank()) {
try { try {
properties.load(new StringReader(src)); properties.load(new StringReader(src));
} catch (IOException ignore) { } catch (IOException ignored) {
// ignore // ignore
} }
} }
@ -419,7 +419,7 @@ public final class RenderUtils {
for (var i = 0; i < len; i++) { for (var i = 0; i < len; i++) {
var inChar = src.charAt(i); var inChar = src.charAt(i);
if ((inChar >= 'A') && (inChar <= 'Z')) { if (inChar >= 'A' && inChar <= 'Z') {
inChar += (char) 13; inChar += (char) 13;
if (inChar > 'Z') { if (inChar > 'Z') {
@ -427,7 +427,7 @@ public final class RenderUtils {
} }
} }
if ((inChar >= 'a') && (inChar <= 'z')) { if (inChar >= 'a' && inChar <= 'z') {
inChar += (char) 13; inChar += (char) 13;
if (inChar > 'z') { if (inChar > 'z') {
@ -593,10 +593,9 @@ public final class RenderUtils {
return true; return true;
} }
} }
} catch (NumberFormatException ignore) { } catch (NumberFormatException ignored) {
// do nothing // do nothing
} }
return false; return false;
} }
} }

View file

@ -17,7 +17,6 @@
package rife.render; package rife.render;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import rife.template.TemplateFactory; import rife.template.TemplateFactory;