kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 86b23c4def3b38e8380341f77d3c0bb7f9a70f287caddd371946b8fd2fe60f94 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2016-04-19 18:58 +02:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2016-04-19 12:08 -05:00 |
| Parents | 90868556be12 |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/exceptions/CodecNotFoundException.java +11 −4
| @@ -30,13 +30,15 @@ | ||
| 30 | 30 | private final TypeToken<?> javaType; |
| 31 | 31 | |
| 32 | 32 | public CodecNotFoundException(String msg, DataType cqlType, TypeToken<?> javaType) { |
| 33 | - super(msg); | |
| 34 | - this.cqlType = cqlType; | |
| 35 | - this.javaType = javaType; | |
| 33 | + this(msg, null, cqlType, javaType); | |
| 36 | 34 | } |
| 37 | 35 | |
| 38 | 36 | public CodecNotFoundException(Throwable cause, DataType cqlType, TypeToken<?> javaType) { |
| 39 | - super(cause); | |
| 37 | + this(null, cause, cqlType, javaType); | |
| 38 | + } | |
| 39 | + | |
| 40 | + private CodecNotFoundException(String msg, Throwable cause, DataType cqlType, TypeToken<?>javaType) { | |
| 41 | + super(msg, cause); | |
| 40 | 42 | this.cqlType = cqlType; |
| 41 | 43 | this.javaType = javaType; |
| 42 | 44 | } |
| @@ -48,4 +50,9 @@ | ||
| 48 | 50 | public TypeToken<?> getJavaType() { |
| 49 | 51 | return javaType; |
| 50 | 52 | } |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public CodecNotFoundException copy() { | |
| 56 | + return new CodecNotFoundException(getMessage(), getCause(), getCqlType(), getJavaType()); | |
| 57 | + } | |
| 51 | 58 | } |