cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abulat...@apache.org
Subject [cayenne] 02/04: CAY-2557 Add java.time.Duration and java.time.Period to supported types
Date Mon, 10 Jun 2019 13:53:11 GMT
This is an automated email from the ASF dual-hosted git repository.

abulatski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git

commit 507665955543c56a228f1fd2aaca84c98bfda717
Author: Arseni Bulatski <ancarseni@gmail.com>
AuthorDate: Thu Apr 11 15:42:47 2019 +0300

    CAY-2557 Add java.time.Duration and java.time.Period to supported types
---
 .../apache/cayenne/crypto/transformer/value/PeriodConverter.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/cayenne-crypto/src/main/java/org/apache/cayenne/crypto/transformer/value/PeriodConverter.java
b/cayenne-crypto/src/main/java/org/apache/cayenne/crypto/transformer/value/PeriodConverter.java
index ae2de6d..fed6b79 100644
--- a/cayenne-crypto/src/main/java/org/apache/cayenne/crypto/transformer/value/PeriodConverter.java
+++ b/cayenne-crypto/src/main/java/org/apache/cayenne/crypto/transformer/value/PeriodConverter.java
@@ -27,15 +27,11 @@ import java.time.Period;
  */
 public class PeriodConverter implements BytesConverter<Period> {
 
-    private static final String DEFAULT_CHARSET = "UTF-8";
-
     public static final BytesConverter<Period> INSTANCE = new PeriodConverter();
 
-    private Charset utf8;
+    private static Charset utf8 = Charset.forName("UTF-8");
 
-    PeriodConverter() {
-        this.utf8 = Charset.forName(DEFAULT_CHARSET);
-    }
+    PeriodConverter() {}
 
     @Override
     public Period fromBytes(byte[] bytes) {


Mime
View raw message