From d3838e389e1d635586d5d8cc8f3844a0a8e738fd Mon Sep 17 00:00:00 2001 From: ayn leslie Date: Mon, 29 Dec 2014 11:30:41 -0800 Subject: [PATCH] Releasing DataSync 1.5.4 with some minor clean-up --- README.md | 2 +- pom.xml | 7 ++++++- .../datasync/config/controlfile/FileTypeControl.java | 10 ++++++---- .../datasync/validation/IntegrationJobValidity.java | 10 +++++----- .../java/com/socrata/datasync/VersionProviderTest.java | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e5aee7ef..9c8d478e 100644 --- a/README.md +++ b/README.md @@ -50,5 +50,5 @@ mvn clean compile -Dmaven.test.skip=true assembly:single This puts the JAR file into the "target" directory inside the repo. So to open DataSync, simply: ``` cd target -java -jar DataSync-1.5.3-jar-with-dependencies.jar +java -jar DataSync-1.5.4-jar-with-dependencies.jar ``` diff --git a/pom.xml b/pom.xml index bdc0d2d4..16f6dbf8 100644 --- a/pom.xml +++ b/pom.xml @@ -3,8 +3,13 @@ 4.0.0 DataSync DataSync - 1.5.3 + 1.5.4 + + Ayn Leslie-Cook + ayn.leslie@socrata.com + Socrata + Adrian Laurenzi adrian.laurenzi@socrata.com diff --git a/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java b/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java index 4007436f..aea5e160 100644 --- a/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java +++ b/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java @@ -68,10 +68,12 @@ public boolean hasTimestampFormatting() { public Set lookupTimestampFormatting() { Set formats = new HashSet<>(); - for (String format : floatingTimestampFormat) - formats.add(format); - for (String format : fixedTimestampFormat) - formats.add(format); + if (floatingTimestampFormat != null) + for (String format : floatingTimestampFormat) + formats.add(format); + if (fixedTimestampFormat != null) + for (String format : fixedTimestampFormat) + formats.add(format); if (overrides != null) { for (ColumnOverride override : overrides.values()) { if (override.timestampFormat != null) { diff --git a/src/main/java/com/socrata/datasync/validation/IntegrationJobValidity.java b/src/main/java/com/socrata/datasync/validation/IntegrationJobValidity.java index 9d88bb5a..e84cf33d 100644 --- a/src/main/java/com/socrata/datasync/validation/IntegrationJobValidity.java +++ b/src/main/java/com/socrata/datasync/validation/IntegrationJobValidity.java @@ -119,17 +119,17 @@ public static JobStatus validateJobParams(UserPreferences userPrefs, Integration return noHeaders; } + JobStatus controlHeaderAgreement = checkControlAgreement(fileControl, schema, rawHeaders, + intermediateHeaders, publishFile.getName()); + if (controlHeaderAgreement.isError()) + return controlHeaderAgreement; + Set synthetics = new HashSet<>(); if (fileControl.hasSyntheticLocations()) synthetics = fileControl.syntheticLocations.keySet(); JobStatus csvDatasetAgreement = checkColumnAgreement(schema, finalHeaders, synthetics, publishFile.getName()); if (csvDatasetAgreement.isError()) return csvDatasetAgreement; - JobStatus controlHeaderAgreement = checkControlAgreement(fileControl, schema, rawHeaders, - intermediateHeaders, publishFile.getName()); - if (controlHeaderAgreement.isError()) - return controlHeaderAgreement; - } } catch (Exception e) { // Not going to fail jobs on the validation check diff --git a/src/test/java/com/socrata/datasync/VersionProviderTest.java b/src/test/java/com/socrata/datasync/VersionProviderTest.java index 6f63cae5..b522d94d 100644 --- a/src/test/java/com/socrata/datasync/VersionProviderTest.java +++ b/src/test/java/com/socrata/datasync/VersionProviderTest.java @@ -48,6 +48,6 @@ public void testIsLatestVersion() throws URISyntaxException { @Test public void testGetThisVersion() { - TestCase.assertEquals("1.5.3", VersionProvider.getThisVersion()); + TestCase.assertEquals("1.5.4", VersionProvider.getThisVersion()); } }