Skip to content

Commit

Permalink
Correctly use slashes in paths
Browse files Browse the repository at this point in the history
Fix: #1
  • Loading branch information
io7m committed Nov 25, 2020
1 parent 1a1ddec commit 409987b
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 18 deletions.
13 changes: 11 additions & 2 deletions README-CHANGES.xml
@@ -1,9 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<c:changelog project="com.io7m.jbssio" xmlns:c="urn:com.io7m.changelog:4.0">
<c:releases>
<c:release date="2020-11-25T20:09:47+00:00" ticket-system="com.github.io7m.jbssio" version="1.0.0">
<c:release date="2020-11-25T00:00:00+00:00" ticket-system="com.github.io7m.jbssio" version="1.0.0">
<c:changes>
<c:change date="2020-11-25T20:09:47+00:00" summary="Initial public release"/>
<c:change date="2020-11-25T00:00:00+00:00" summary="Initial public release"/>
</c:changes>
</c:release>
<c:release date="2020-11-25T21:27:07+00:00" ticket-system="com.github.io7m.jbssio" version="1.0.1">
<c:changes>
<c:change date="2020-11-25T00:00:00+00:00" summary="Correctly use slashes in paths">
<c:tickets>
<c:ticket id="1"/>
</c:tickets>
</c:change>
</c:changes>
</c:release>
</c:releases>
Expand Down
2 changes: 1 addition & 1 deletion com.io7m.jbssio.api/pom.xml
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>com.io7m.jbssio</artifactId>
<groupId>com.io7m.jbssio</groupId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
</parent>

<artifactId>com.io7m.jbssio.api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion com.io7m.jbssio.tests/pom.xml
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>com.io7m.jbssio</artifactId>
<groupId>com.io7m.jbssio</groupId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
</parent>

<artifactId>com.io7m.jbssio.tests</artifactId>
Expand Down
Expand Up @@ -60,11 +60,11 @@ public void testNames()
try (var s0 = reader.createSubReaderAt("x", 0L)) {
try (var s1 = s0.createSubReaderAt("y", 0L)) {
try (var s2 = s1.createSubReaderAt("z", 0L)) {
Assertions.assertEquals("a.x.y.z", s2.path());
Assertions.assertEquals("a/x/y/z", s2.path());
}
Assertions.assertEquals("a.x.y", s1.path());
Assertions.assertEquals("a/x/y", s1.path());
}
Assertions.assertEquals("a.x", s0.path());
Assertions.assertEquals("a/x", s0.path());
}
Assertions.assertEquals("a", reader.path());
}
Expand Down
Expand Up @@ -77,11 +77,11 @@ public void testNames()
try (var s0 = reader.createSubReaderAt("x", 0L)) {
try (var s1 = s0.createSubReaderAt("y", 0L)) {
try (var s2 = s1.createSubReaderAt("z", 0L)) {
Assertions.assertEquals("a.x.y.z", s2.path());
Assertions.assertEquals("a/x/y/z", s2.path());
}
Assertions.assertEquals("a.x.y", s1.path());
Assertions.assertEquals("a/x/y", s1.path());
}
Assertions.assertEquals("a.x", s0.path());
Assertions.assertEquals("a/x", s0.path());
}
Assertions.assertEquals("a", reader.path());
}
Expand Down
Expand Up @@ -109,11 +109,11 @@ public void testNames()
try (var s0 = writer.createSubWriterAt("x", 0L)) {
try (var s1 = s0.createSubWriterAt("y", 0L)) {
try (var s2 = s1.createSubWriterAt("z", 0L)) {
Assertions.assertEquals("a.x.y.z", s2.path());
Assertions.assertEquals("a/x/y/z", s2.path());
}
Assertions.assertEquals("a.x.y", s1.path());
Assertions.assertEquals("a/x/y", s1.path());
}
Assertions.assertEquals("a.x", s0.path());
Assertions.assertEquals("a/x", s0.path());
}
Assertions.assertEquals("a", writer.path());
}
Expand Down
2 changes: 1 addition & 1 deletion com.io7m.jbssio.vanilla/pom.xml
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>com.io7m.jbssio</artifactId>
<groupId>com.io7m.jbssio</groupId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
</parent>

<artifactId>com.io7m.jbssio.vanilla</artifactId>
Expand Down
Expand Up @@ -18,7 +18,7 @@

final class BSSPaths
{
static final char PATH_SEPARATOR = '.';
static final char PATH_SEPARATOR = '/';

private BSSPaths()
{
Expand Down
Expand Up @@ -152,8 +152,7 @@ private int readS8p(final String name)
final var position = this.offsetCurrentAbsolute();
this.increaseOffsetRelative(1L);
this.map.position(0);
return this.map.get(longPositionTo2GBLimitedByteBufferPosition(
position));
return this.map.get(longPositionTo2GBLimitedByteBufferPosition(position));
}

private int readU8p(final String name)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -14,7 +14,7 @@

<groupId>com.io7m.jbssio</groupId>
<artifactId>com.io7m.jbssio</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>com.io7m.jbssio</name>
Expand Down

0 comments on commit 409987b

Please sign in to comment.