From: David ‘Bombe’ Roden Date: Fri, 10 Oct 2014 20:24:14 +0000 (+0200) Subject: Use statially imported valueOf(). X-Git-Tag: 0.9-rc1^2~3^2~68 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f6d9b5d748432a6765e508447b2cc954bd45d807;p=Sone.git Use statially imported valueOf(). --- diff --git a/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java b/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java index 15881db..9ede851 100644 --- a/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java @@ -79,11 +79,11 @@ public class ImageLinkFilter implements Filter { if (image == null) { return null; } - String imageClass = String.valueOf(parameters.get("class")); + String imageClass = valueOf(parameters.get("class")); int maxWidth = parseInt(valueOf(parameters.get("max-width")), MAX_VALUE); int maxHeight = parseInt(valueOf(parameters.get("max-height")), MAX_VALUE); - String mode = String.valueOf(parameters.get("mode")); - String title = String.valueOf(parameters.get("title")); + String mode = valueOf(parameters.get("mode")); + String title = valueOf(parameters.get("title")); TemplateContext linkTemplateContext = templateContextFactory.createTemplateContext(); linkTemplateContext.set("class", imageClass); diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index f402a41..ec35e2e 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -91,7 +91,7 @@ public class ParserFilter implements Filter { */ @Override public Object format(TemplateContext templateContext, Object data, Map parameters) { - String text = String.valueOf(data); + String text = valueOf(data); int length = parseInt(valueOf(parameters.get("length")), -1); int cutOffLength = parseInt(valueOf(parameters.get("cut-off-length")), length); Object sone = parameters.get("sone");