Skip to content

Commit ff40de6

Browse files
committed
Немного ленивости
1 parent 75e2e23 commit ff40de6

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
package com.github._1c_syntax.mdclasses.metadata.utils;
22

33
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
4+
import lombok.Getter;
45
import lombok.experimental.UtilityClass;
56

67
@UtilityClass
78
public class ObjectMapperFactory {
8-
9-
private static final XmlMapper xmlMapper = createXmlMapper();
10-
11-
public static XmlMapper getXmlMapper() {
12-
return xmlMapper;
13-
}
14-
15-
private static XmlMapper createXmlMapper() {
16-
return new XmlMapper();
17-
}
9+
@Getter(lazy = true)
10+
private static final XmlMapper xmlMapper = new XmlMapper();
1811
}

0 commit comments

Comments
 (0)