kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | bd350391f78d832ffa6bf8c6e074251908160d5e5650acf1431bec4f8eae90df |
|---|---|
| Author | Alexandre Dutra <alexandre.dutra@datastax.com> · 2016-03-24 17:02 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-04-20 18:01 +02:00 |
| Parents | 6e44dad32a41 |
9 files changed
modified changelog/README.md +1 −0
| @@ -9,6 +9,7 @@ | ||
| 9 | 9 | - [bug] JAVA-1074: Fix documentation around default timestamp generator. |
| 10 | 10 | - [improvement] JAVA-1109: Document SSLOptions changes in upgrade guide. |
| 11 | 11 | - [improvement] JAVA-1065: Add method to create token from partition key values. |
| 12 | +- [improvement] JAVA-1136: Enable JDK signature check in module driver-extras. | |
| 12 | 13 | |
| 13 | 14 | Merged from 2.1 branch: |
| 14 | 15 |
modified driver-extras/pom.xml +33 −12
| @@ -142,18 +142,39 @@ | ||
| 142 | 142 | <plugin> |
| 143 | 143 | <groupId>org.codehaus.mojo</groupId> |
| 144 | 144 | <artifactId>animal-sniffer-maven-plugin</artifactId> |
| 145 | - <configuration> | |
| 146 | - <!-- | |
| 147 | - There is no support for JDK 8 yet, see | |
| 148 | - https://github.com/mojohaus/animal-sniffer/issues/1 | |
| 149 | - --> | |
| 150 | - <skip>true</skip> | |
| 151 | - <signature> | |
| 152 | - <groupId>org.codehaus.mojo.signature</groupId> | |
| 153 | - <artifactId>java18</artifactId> | |
| 154 | - <version>1.0</version> | |
| 155 | - </signature> | |
| 156 | - </configuration> | |
| 145 | + <executions> | |
| 146 | + <execution> | |
| 147 | + <id>check</id> | |
| 148 | + <phase>process-classes</phase> | |
| 149 | + <goals> | |
| 150 | + <goal>check</goal> | |
| 151 | + </goals> | |
| 152 | + <configuration> | |
| 153 | + <signature> | |
| 154 | + <groupId>org.codehaus.mojo.signature</groupId> | |
| 155 | + <artifactId>java16</artifactId> | |
| 156 | + <version>1.0</version> | |
| 157 | + </signature> | |
| 158 | + <annotations> | |
| 159 | + <annotation>com.datastax.driver.extras.codecs.jdk8.IgnoreJDK6Requirement</annotation> | |
| 160 | + </annotations> | |
| 161 | + </configuration> | |
| 162 | + </execution> | |
| 163 | + <execution> | |
| 164 | + <id>check-jdk8</id> | |
| 165 | + <phase>process-classes</phase> | |
| 166 | + <goals> | |
| 167 | + <goal>check</goal> | |
| 168 | + </goals> | |
| 169 | + <configuration> | |
| 170 | + <signature> | |
| 171 | + <groupId>org.codehaus.mojo.signature</groupId> | |
| 172 | + <artifactId>java18</artifactId> | |
| 173 | + <version>1.0</version> | |
| 174 | + </signature> | |
| 175 | + </configuration> | |
| 176 | + </execution> | |
| 177 | + </executions> | |
| 157 | 178 | </plugin> |
| 158 | 179 | |
| 159 | 180 | <plugin> |
added driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/IgnoreJDK6Requirement.java +25 −0
| @@ -0,0 +1,25 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (C) 2012-2015 DataStax Inc. | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + */ | |
| 16 | +package com.datastax.driver.extras.codecs.jdk8; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * Annotation used to mark classes in this package as | |
| 20 | + * excluded from JDK signature check performed | |
| 21 | + * by <a href="http://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/check-mojo.html">animal-sniffer</a> | |
| 22 | + * Maven plugin as they require JDK 8 and not the usual JDK 6. | |
| 23 | + */ | |
| 24 | +@interface IgnoreJDK6Requirement { | |
| 25 | +} |
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java +2 −1
| @@ -47,7 +47,8 @@ | ||
| 47 | 47 | * @see ZonedDateTimeCodec |
| 48 | 48 | * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">'Working with timestamps' section of CQL specification</a> |
| 49 | 49 | */ |
| 50 | -public class InstantCodec extends TypeCodec<Instant> { | |
| 50 | +@IgnoreJDK6Requirement | |
| 51 | +public class InstantCodec extends TypeCodec<java.time.Instant> { | |
| 51 | 52 | |
| 52 | 53 | public static final InstantCodec instance = new InstantCodec(); |
| 53 | 54 |
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java +1 −0
| @@ -33,6 +33,7 @@ | ||
| 33 | 33 | * {@link TypeCodec} that maps |
| 34 | 34 | * {@link java.time.LocalDate} to CQL {@code date}. |
| 35 | 35 | */ |
| 36 | +@IgnoreJDK6Requirement | |
| 36 | 37 | public class LocalDateCodec extends TypeCodec<LocalDate> { |
| 37 | 38 | |
| 38 | 39 | public static final LocalDateCodec instance = new LocalDateCodec(); |
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java +1 −0
| @@ -30,6 +30,7 @@ | ||
| 30 | 30 | /** |
| 31 | 31 | * {@link TypeCodec} that maps {@link LocalTime} to CQL {@code time} (long representing nanoseconds since midnight). |
| 32 | 32 | */ |
| 33 | +@IgnoreJDK6Requirement | |
| 33 | 34 | public class LocalTimeCodec extends TypeCodec<LocalTime> { |
| 34 | 35 | |
| 35 | 36 | public static final LocalTimeCodec instance = new LocalTimeCodec(); |
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.java +1 −0
| @@ -30,6 +30,7 @@ | ||
| 30 | 30 | * |
| 31 | 31 | * @param <T> The wrapped Java type |
| 32 | 32 | */ |
| 33 | +@IgnoreJDK6Requirement | |
| 33 | 34 | public class OptionalCodec<T> extends MappingCodec<Optional<T>, T> { |
| 34 | 35 | |
| 35 | 36 | private final Predicate<T> isAbsent; |
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java +1 −0
| @@ -53,6 +53,7 @@ | ||
| 53 | 53 | * |
| 54 | 54 | * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">'Working with timestamps' section of CQL specification</a> |
| 55 | 55 | */ |
| 56 | +@IgnoreJDK6Requirement | |
| 56 | 57 | public class ZonedDateTimeCodec extends TypeCodec.AbstractTupleCodec<ZonedDateTime> { |
| 57 | 58 | |
| 58 | 59 | /** |
modified pom.xml +1 −1
| @@ -357,7 +357,7 @@ | ||
| 357 | 357 | <plugin> |
| 358 | 358 | <groupId>org.codehaus.mojo</groupId> |
| 359 | 359 | <artifactId>animal-sniffer-maven-plugin</artifactId> |
| 360 | - <version>1.14</version> | |
| 360 | + <version>1.15</version> | |
| 361 | 361 | <configuration> |
| 362 | 362 | <signature> |
| 363 | 363 | <groupId>org.codehaus.mojo.signature</groupId> |