Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-eggers committed Jul 18, 2016
1 parent 3a317d4 commit 8273315
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@

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)
{
element.addAttribute(new Attribute(name, value.toString()));
}
}

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)
{
Expand All @@ -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)
{
Expand Down

0 comments on commit 8273315

Please sign in to comment.