Skip to content

Commit c5dfdb7

Browse files
committed
Merge branch 'release/0.6.0'
* release/0.6.0: README: show version 0.6.0 build as 0.6.0 tune travis config git ignores gradle coordinates typos update a few dependencies to newer versions drop Java 6 Support.
2 parents b3660f8 + 624ffff commit c5dfdb7

File tree

9 files changed

+34
-21
lines changed

9 files changed

+34
-21
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ target
33
.project
44
.settings
55
.idea
6-
edn-java.iml
7-
hello/hello.iml
6+
*.iml
7+
*.ipr
8+
*.iws
9+
.project
10+
.settings

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
sudo: false
2+
13
language: java
4+
25
jdk:
36
- oraclejdk8
47
- oraclejdk7
58
- openjdk7
6-
- openjdk6
9+
10+
cache:
11+
directories:
12+
- $HOME/.m2

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ This is a Maven project with the following coordinates:
1212
<dependency>
1313
<groupId>us.bpsm</groupId>
1414
<artifactId>edn-java</artifactId>
15-
<version>0.5.0</version>
15+
<version>0.6.0</version>
1616
</dependency>
1717
```
1818

1919
It is available through the OSS Sonatype Releases repository:
2020

2121
https://oss.sonatype.org/content/repositories/releases
2222

23+
or the Gradle coordinates:
24+
```groovy
25+
compile 'us.bpsm:edn-java:0.6.0'
26+
```
2327
## Parsing
2428

2529
You'll need to create a Parser and supply it with some input. Factory methods to create Parseable input are provided which accept either a `java.lang.CharSequence` or a `java.lang.Readable`. You can then call `nextValue()` on the Parser to get values form the input. When the input is exhausted, `nextValue()` will return `Parser.END_OF_INPUT`.
@@ -59,7 +63,7 @@ Most *edn* values map to regular Java types, except in such cases where Java doe
5963

6064
Integers map to, `Long` or `BigInteger` depending on the magnitude of the number. Appending `N` to an integer literal maps to `BigInteger` irrespective of the magnitude.
6165

62-
Floating point numbers with the suffix `M` are mapeped to `BigDecimal`. All others are mapped to `Double`.
66+
Floating point numbers with the suffix `M` are mapped to `BigDecimal`. All others are mapped to `Double`.
6367

6468
Characters are mapped to `Character`, booleans to `Boolean` and strings to `String`. No great shock there, I trust.
6569

@@ -130,7 +134,7 @@ The package `us.bpsm.edn.parser` makes three handlers for `#inst` available:
130134

131135
- `InstantToDate` is the default and converts each `#inst` to a `java.util.Date`.
132136
- `InstantToCalendar` converts each `#inst` to a `java.util.Calendar`, which preserves the original GTM offset.
133-
- `InstantToTimestamp` converts each `#inst` to a `java.sql.Timstamp`, which presrves nanoseconds.
137+
- `InstantToTimestamp` converts each `#inst` to a `java.sql.Timstamp`, which preserves nanoseconds.
134138

135139
Extend `AbstractInstantHandler` to provide your own implementation of `#inst`.
136140

@@ -356,5 +360,5 @@ public class CustomTagPrinter {
356360
### Limitations
357361

358362
- Edn values must be *acyclic*. Any attempt to print a data structure containing cycles will surely end in a stack overflow.
359-
- The current Printing support stikes me a as a bit of a hack. The API may change with 1.0.0.
363+
- The current Printing support strikes me a as a bit of a hack. The API may change with 1.0.0.
360364
- Edn-Java does not provide much by way of "convenience" methods. As a library it's still to young to really know what would be convenient, though I'm open to suggestions.

pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</parent>
99
<groupId>us.bpsm</groupId>
1010
<artifactId>edn-java</artifactId>
11-
<version>0.5.0</version>
11+
<version>0.6.0</version>
1212
<packaging>jar</packaging>
1313
<name>EDN Java</name>
1414
<description>
@@ -48,7 +48,7 @@
4848
<dependency>
4949
<groupId>junit</groupId>
5050
<artifactId>junit</artifactId>
51-
<version>4.11</version>
51+
<version>4.12</version>
5252
<scope>test</scope>
5353
</dependency>
5454
<dependency>
@@ -63,16 +63,16 @@
6363
<plugin>
6464
<groupId>org.apache.maven.plugins</groupId>
6565
<artifactId>maven-compiler-plugin</artifactId>
66-
<version>2.5.1</version>
66+
<version>3.6.1</version>
6767
<configuration>
68-
<source>1.6</source>
69-
<target>1.6</target>
68+
<source>1.7</source>
69+
<target>1.7</target>
7070
</configuration>
7171
</plugin>
7272
<plugin>
7373
<groupId>org.apache.maven.plugins</groupId>
7474
<artifactId>maven-source-plugin</artifactId>
75-
<version>2.2.1</version>
75+
<version>3.0.1</version>
7676
<executions>
7777
<execution>
7878
<id>attach-sources</id>
@@ -86,7 +86,7 @@
8686
<plugin>
8787
<groupId>org.apache.maven.plugins</groupId>
8888
<artifactId>maven-javadoc-plugin</artifactId>
89-
<version>2.10.1</version>
89+
<version>2.10.4</version>
9090
<configuration>
9191
<show>protected</show>
9292
<nohelp>true</nohelp>
@@ -128,7 +128,7 @@
128128
<plugin>
129129
<groupId>org.apache.maven.plugins</groupId>
130130
<artifactId>maven-gpg-plugin</artifactId>
131-
<version>1.1</version>
131+
<version>1.6</version>
132132
<executions>
133133
<execution>
134134
<id>sign-artifacts</id>

src/main/java/us/bpsm/edn/parser/InstantToCalendar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
package us.bpsm.edn.parser;
33

44
/**
5-
* A Handler for {@code #inst} which translates the intant into a
5+
* A Handler for {@code #inst} which translates the instant into a
66
* {@link java.util.Calendar}.
77
*/
88
public class InstantToCalendar extends AbstractInstantHandler {

src/main/java/us/bpsm/edn/parser/InstantToDate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
package us.bpsm.edn.parser;
33

44
/**
5-
* A Handler for {@code #inst} which translates the intant into a
5+
* A Handler for {@code #inst} which translates the instant into a
66
* {@link java.util.Date}.
77
*/
88
public final class InstantToDate extends AbstractInstantHandler {

src/main/java/us/bpsm/edn/parser/InstantUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static ParsedInstant parse(String value) {
6666
assert 0 <= nanoseconds && nanoseconds <= 999999999:
6767
"nanoseconds are assured to be in [0..999999999] by INSTANT Pattern";
6868
assert -1 <= offsetSign && offsetSign <= 1:
69-
"parser assuers offsetSign is -1, 0 or 1.";
69+
"parser assures offsetSign is -1, 0 or 1.";
7070
if (offsetHours < 0 || 23 < offsetHours) {
7171
throw new EdnSyntaxException(
7272
String.format("'%02d' is not a valid offset hour in '%s'",

src/main/java/us/bpsm/edn/parser/UuidHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class UuidHandler implements TagHandler {
1212
public Object transform(Tag tag, Object value) {
1313
if (!(value instanceof String)) {
1414
throw new EdnSyntaxException(tag.toString() +
15-
" expectes a String.");
15+
" expects a String.");
1616
}
1717
return UUID.fromString((String) value);
1818
}

src/main/java/us/bpsm/edn/protocols/C3.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class C3 {
2323
*
2424
* @return The linearization of c: never null and never empty.
2525
*
26-
* @throws EdnException if the inheritance hiearchy of {@code c}
27-
* makes it impossible to compuate a consistent hierarchy
26+
* @throws EdnException if the inheritance hierarchy of {@code c}
27+
* makes it impossible to compute a consistent hierarchy
2828
* for {@code c}.
2929
*/
3030
static List<Class<?>> methodResolutionOrder(Class<?> c) {

0 commit comments

Comments
 (0)