This commit is contained in:
Moandji Ezana 2017-08-05 15:12:28 +02:00
parent e2b212e0a5
commit 293f512068
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,11 @@
# toml4j Changelog
## 0.7.2 / 2017-08-05
## Fixed
* [tomlWriter.write NullPointerException in JDK9](https://github.com/mwanji/toml4j/issues/46) (thanks to __[iwangxiaodong](https://github.com/iwangxiaodong)__)
## 0.7.1 / 2016-07-27
* [Support literal strings in table names](https://github.com/mwanji/toml4j/issues/36) (thanks to __[bruno-medeiros](https://github.com/bruno-medeiros)__)

View File

@ -14,7 +14,7 @@ Add the following dependency to your POM (or equivalent for other dependency man
<dependency>
<groupId>com.moandjiezana.toml</groupId>
<artifactId>toml4j</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</dependency>
```

View File

@ -1,8 +1,8 @@
package com.moandjiezana.toml;
import static com.moandjiezana.toml.BooleanValueReaderWriter.BOOLEAN_VALUE_READER_WRITER;
import static com.moandjiezana.toml.DateValueReaderWriter.DATE_VALUE_READER_WRITER;
import static com.moandjiezana.toml.DateValueReaderWriter.DATE_PARSER_JDK_6;
import static com.moandjiezana.toml.DateValueReaderWriter.DATE_VALUE_READER_WRITER;
import static com.moandjiezana.toml.MapValueWriter.MAP_VALUE_WRITER;
import static com.moandjiezana.toml.NumberValueReaderWriter.NUMBER_VALUE_READER_WRITER;
import static com.moandjiezana.toml.ObjectValueWriter.OBJECT_VALUE_WRITER;
@ -27,7 +27,8 @@ class ValueWriters {
private ValueWriters() {}
private static DateValueReaderWriter getPlatformSpecificDateConverter() {
return Runtime.class.getPackage().getSpecificationVersion().startsWith("1.6") ? DATE_PARSER_JDK_6 : DATE_VALUE_READER_WRITER;
String specificationVersion = Runtime.class.getPackage().getSpecificationVersion();
return specificationVersion != null && specificationVersion.startsWith("1.6") ? DATE_PARSER_JDK_6 : DATE_VALUE_READER_WRITER;
}
private static final ValueWriter[] VALUE_WRITERS = {