Skip to content

Commit

Permalink
Fix reference counting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed Jul 10, 2017
1 parent 7980942 commit afdab89
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased
There are currently no unreleased changes.

## [0.5.1](https://github.com/marcospassos/java-php-serializer/releases/tag/0.5.1) (2017-07-09)

### Changed

- Fix reference counting logic.

## [0.5.0](https://github.com/marcospassos/java-php-serializer/releases/tag/0.5.0) (2017-07-09)

### Changed
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ to the `dependencies` section of its `pom.xml` file:
<dependency>
<groupId>com.marcospassos</groupId>
<artifactId>phpserializer</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</dependency>
</dependencies>
```
Expand Down Expand Up @@ -227,8 +227,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
```

[maven-central-badge]: https://img.shields.io/badge/maven%20central-v0.5.0-blue.svg
[maven-central-latest]: http://search.maven.org/#artifactdetails%7Ccom.marcospassos%7Cphpserializer%7C0.5.0%7Cjar
[maven-central-badge]: https://img.shields.io/badge/maven%20central-v0.5.1-blue.svg
[maven-central-latest]: http://search.maven.org/#artifactdetails%7Ccom.marcospassos%7Cphpserializer%7C0.5.1%7Cjar
[coverall-status]: https://coveralls.io/github/marcospassos/java-php-serializer
[coverall-badge]: https://coveralls.io/repos/github/marcospassos/java-php-serializer/badge.svg
[travis-badge]: https://travis-ci.org/marcospassos/java-php-serializer.svg?branch=master
Expand All @@ -243,4 +243,4 @@ DEALINGS IN THE SOFTWARE.
[issue-tracker]: https://github.com/marcospassos/java-php-serializer/issues
[repository]: https://github.com/marcospassos/java-php-serializer
[releases-page]: https://github.com/marcospassos/java-php-serializer/releases
[latest-release]: https://github.com/marcospassos/java-php-serializer/releases/tag/0.5.0
[latest-release]: https://github.com/marcospassos/java-php-serializer/releases/tag/0.5.1
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.marcospassos</groupId>
<artifactId>phpserializer</artifactId>
<version>0.5.0-SNAPSHOT</version>
<version>0.5.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Java PHP Serializer</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/marcospassos/phpserializer/Writer.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void writeSerializableObjectEnd() {
buffer.append(data);
buffer.append("}");

pointer = subWriter.getPointer() + 1;
pointer = subWriter.getPointer();

subWriter = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void writeSerializableObject() throws Exception
writer.writeSerializableObjectEnd();

assertEquals("C:3:\"Foo\":20:{a:1:{i:0;s:3:\"bar\";}}", writer.getResult());
assertEquals(4, writer.getPointer());
assertEquals(3, writer.getPointer());
}

@Test(expected = IllegalStateException.class)
Expand Down

0 comments on commit afdab89

Please sign in to comment.