From 3ba43704776d76e3dc271d4701c9ebc947a390b7 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 3 May 2010 16:51:15 +0300 Subject: [PATCH] verify that parsing works for dates with slash --- .../java/org/elasticsearch/deps/joda/SimpleJodaTests.java | 7 +++++++ plugins/cloud/build.gradle | 1 + 2 files changed, 8 insertions(+) diff --git a/modules/elasticsearch/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java b/modules/elasticsearch/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java index 2dad4a25e68..08bc44f743f 100644 --- a/modules/elasticsearch/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java +++ b/modules/elasticsearch/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java @@ -19,6 +19,8 @@ package org.elasticsearch.deps.joda; +import org.elasticsearch.util.joda.FormatDateTimeFormatter; +import org.elasticsearch.util.joda.Joda; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; @@ -63,4 +65,9 @@ public class SimpleJodaTests { Date date = new Date(); assertThat(formatter.parseMillis(dateTimeWriter.print(date.getTime())), equalTo(date.getTime())); } + + @Test public void testSlashInFormat() { + FormatDateTimeFormatter formatter = Joda.forPattern("MM/yyyy"); + formatter.parser().parseMillis("01/2001"); + } } diff --git a/plugins/cloud/build.gradle b/plugins/cloud/build.gradle index 6d7f5b34ea0..b939d20ce95 100644 --- a/plugins/cloud/build.gradle +++ b/plugins/cloud/build.gradle @@ -41,6 +41,7 @@ dependencies { compile("org.jclouds:jclouds-httpnio:$jcloudsVersion") compile("org.jclouds:jclouds-blobstore:$jcloudsVersion") compile("org.jclouds:jclouds-aws:$jcloudsVersion") + distLib("org.jclouds:jclouds-httpnio:$jcloudsVersion") distLib("org.jclouds:jclouds-blobstore:$jcloudsVersion") distLib("org.jclouds:jclouds-aws:$jcloudsVersion")