Skip to content

Commit 73b27ca

Browse files
Merge pull request #108 from valydia/bugfix_integrity_check
Bugfix integrity check
2 parents 7ba8e75 + fda7181 commit 73b27ca

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If you wish to use the CSV Validator from your own Java project, we provide a na
3838
<dependency>
3939
<groupId>uk.gov.nationalarchives</groupId>
4040
<artifactId>csv-validator-java-api</artifactId>
41-
<version>1.0</version>
41+
<version>1.1</version>
4242
</dependency>
4343
```
4444

csv-validator-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
<version>1.2</version>
151151
</dependency>
152152
<dependency>
153-
<groupId>org.apache.commons</groupId>
153+
<groupId>commons-io</groupId>
154154
<artifactId>commons-io</artifactId>
155155
<version>1.3.2</version>
156156
</dependency>

csv-validator-core/src/main/scala/uk/gov/nationalarchives/csv/validator/Util.scala

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,9 @@ object Util {
215215
}
216216

217217
private def contentDir(filepath: String, topLevelFolder: String): String = {
218-
val dir = pathSubstitutions.collectFirst{
219-
case (subFrom, subTo) if filepath.contains(subFrom) => FileSystem.file2PlatformIndependent(subTo)
220-
} getOrElse {
221-
(filepath split topLevelFolder).head
222-
}
223-
224-
val sep = "/"
225-
val lastfilePath = dir.split(sep).last
226-
if (lastfilePath.equals(topLevelFolder) || lastfilePath.equals(topLevelFolder + sep)) {
227-
dir
228-
} else
229-
FileSystem.file2PlatformIndependent(dir + sep + topLevelFolder)
218+
val dir = (substitutePath(filepath) split topLevelFolder).head
219+
val sep = "/"
220+
FileSystem.file2PlatformIndependent(dir + sep + topLevelFolder)
230221
}
231222

232223
def jointPath: String = {

csv-validator-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<scala.version>2.11</scala.version>
7676
<scala.lib.version>2.11.6</scala.lib.version>
7777
<scalaz.version>7.1.1</scalaz.version>
78-
<java.version>1.6</java.version>
78+
<java.version>1.7</java.version>
7979
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8080
<contact.email>[email protected]</contact.email>
8181
</properties>

0 commit comments

Comments
 (0)