From 8273315f4f0e47887c401a9f705e0855a74d616b Mon Sep 17 00:00:00 2001 From: Julian Eggers Date: Mon, 18 Jul 2016 22:35:43 +0200 Subject: [PATCH] fixes --- README.md | 4 ++-- .../spring/xom/marshaller/writer/WriterUtil.java | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index af6c37f..3c65220 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ spring-xom-marshaller ============ [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.itelg.spring/spring-xom-marshaller/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.itelg.spring/spring-xom-marshaller) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d134d532488b44e5aaaf1b9775999035)](https://www.codacy.com/app/eggers-julian/spring-xom-marshaller?utm_source=github.com&utm_medium=referral&utm_content=julian-eggers/spring-xom-marshaller&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/40fe4c8aa29241429724a9c415051a06)](https://www.codacy.com/app/eggers-julian/spring-xom-marshaller?utm_source=github.com&utm_medium=referral&utm_content=julian-eggers/spring-xom-marshaller&utm_campaign=Badge_Grade) [![Coverage Status](https://coveralls.io/repos/julian-eggers/spring-xom-marshaller/badge.svg)](https://coveralls.io/r/julian-eggers/spring-xom-marshaller) [![Build Status](https://travis-ci.org/julian-eggers/spring-xom-marshaller.svg?branch=master)](https://travis-ci.org/julian-eggers/spring-xom-marshaller) @@ -23,7 +23,7 @@ Spring XML Marshalling with [XOM](http://www.xom.nu/) ##### Enable auto-configuration via annotation -[@Autowire](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowire.html) XomUnmarshaller for further use in [MarshallingHttpMessageConverter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.html) or [MarshallingMessageConverter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/messaging/converter/MarshallingMessageConverter.html). +[@Autowire](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowire.html) XomMarshaller for further use in [MarshallingHttpMessageConverter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.html) or [MarshallingMessageConverter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/messaging/converter/MarshallingMessageConverter.html). ```java @SpringBootApplication diff --git a/src/main/java/com/itelg/spring/xom/marshaller/writer/WriterUtil.java b/src/main/java/com/itelg/spring/xom/marshaller/writer/WriterUtil.java index 2886b94..861d4fc 100644 --- a/src/main/java/com/itelg/spring/xom/marshaller/writer/WriterUtil.java +++ b/src/main/java/com/itelg/spring/xom/marshaller/writer/WriterUtil.java @@ -12,14 +12,14 @@ public class WriterUtil { - private final DateTimeFormatter format = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.systemDefault()); + private static final DateTimeFormatter format = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.systemDefault()); private WriterUtil() { } - public void addAttribute(Element element, String name, Object value) + public static void addAttribute(Element element, String name, Object value) { if (value != null) { @@ -27,22 +27,22 @@ public void addAttribute(Element element, String name, Object value) } } - public void addAttribute(Element element, String name, int value) + public static void addAttribute(Element element, String name, int value) { element.addAttribute(new Attribute(name, String.valueOf(value))); } - public void addAttribute(Element element, String name, long value) + public static void addAttribute(Element element, String name, long value) { element.addAttribute(new Attribute(name, String.valueOf(value))); } - public void addAttribute(Element element, String name, double value) + public static void addAttribute(Element element, String name, double value) { element.addAttribute(new Attribute(name, String.valueOf(value))); } - public void addAttribute(Element element, String name, Date value) + public static void addAttribute(Element element, String name, Date value) { if (value != null) { @@ -51,7 +51,7 @@ public void addAttribute(Element element, String name, Date value) } } - public void addAttribute(Element element, String name, LocalDateTime value) + public static void addAttribute(Element element, String name, LocalDateTime value) { if (value != null) {