You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2015/08/01 01:53:51 UTC
[1/2] incubator-commonsrdf git commit: Use constants defined on
StandardCharsets instead of retrieving Charsets by name
Repository: incubator-commonsrdf
Updated Branches:
refs/heads/master 1103c868f -> 3b0028621
Use constants defined on StandardCharsets instead of retrieving Charsets by name
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/d9021b1a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/d9021b1a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/d9021b1a
Branch: refs/heads/master
Commit: d9021b1a37f5e957d324aa125dbc65e881757e8a
Parents: 7a0de10
Author: Benedikt Ritter <be...@gmail.com>
Authored: Fri May 1 23:06:14 2015 +0200
Committer: Benedikt Ritter <be...@gmail.com>
Committed: Fri May 1 23:06:14 2015 +0200
----------------------------------------------------------------------
examples/src/example/UserGuideTest.java | 2 +-
.../java/org/apache/commons/rdf/simple/TestWritingGraph.java | 7 ++++---
src/site/markdown/userguide.md.vm | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d9021b1a/examples/src/example/UserGuideTest.java
----------------------------------------------------------------------
diff --git a/examples/src/example/UserGuideTest.java b/examples/src/example/UserGuideTest.java
index 3c66fbe..eab6b0d 100644
--- a/examples/src/example/UserGuideTest.java
+++ b/examples/src/example/UserGuideTest.java
@@ -214,6 +214,6 @@ public class UserGuideTest {
public static void writeGraph(Graph graph, Path graphFile) throws Exception {
Stream<CharSequence> stream = graph.getTriples().map(UserGuideTest::tripleAsString);
- Files.write(graphFile, stream::iterator, Charset.forName("UTF-8"));
+ Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d9021b1a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java b/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
index 3818e22..9862770 100644
--- a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
+++ b/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
@@ -20,6 +20,7 @@ package org.apache.commons.rdf.simple;
import static org.junit.Assert.assertEquals;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
@@ -123,7 +124,7 @@ public class TestWritingGraph {
}
Stream<CharSequence> stream = graph.getTriples().map(TestWritingGraph::tripleAsString);
- Files.write(graphFile, stream::iterator, Charset.forName("UTF-8"));
+ Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
@Test
@@ -139,7 +140,7 @@ public class TestWritingGraph {
IRI predicate = factory.createIRI("pred");
Stream<CharSequence> stream = graph
.getTriples(subject, predicate, null).map(TestWritingGraph::tripleAsString);
- Files.write(graphFile, stream::iterator, Charset.forName("UTF-8"));
+ Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
@@ -156,7 +157,7 @@ public class TestWritingGraph {
IRI predicate = factory.createIRI("pred");
Stream<CharSequence> stream = graph
.getTriples(subject, predicate, null).map(Object::toString);
- Files.write(graphFile, stream::iterator, Charset.forName("UTF-8"));
+ Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d9021b1a/src/site/markdown/userguide.md.vm
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md.vm b/src/site/markdown/userguide.md.vm
index cca6998..c26ae6c 100644
--- a/src/site/markdown/userguide.md.vm
+++ b/src/site/markdown/userguide.md.vm
@@ -231,7 +231,7 @@ public class NTriplesSerializer {
}
public static void writeGraph(Graph graph, Path graphFile) throws Exception {
Stream<CharSequence> stream = graph.getTriples().map(NTriplesSerializer::tripleAsString);
- Files.write(graphFile, stream::iterator, Charset.forName("UTF-8"));
+ Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
}
}
```
[2/2] incubator-commonsrdf git commit: Merge remote-tracking branch
'britter/standard-charsets'
Posted by st...@apache.org.
Merge remote-tracking branch 'britter/standard-charsets'
This closes #11
Contributed by Benedikt Ritter
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/3b002862
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/3b002862
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/3b002862
Branch: refs/heads/master
Commit: 3b0028621ae2e2a0fbdfa6486f87b05aa83e6221
Parents: 1103c86 d9021b1
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sat Aug 1 00:52:25 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sat Aug 1 00:52:25 2015 +0100
----------------------------------------------------------------------
examples/src/example/UserGuideTest.java | 2 +-
.../java/org/apache/commons/rdf/simple/TestWritingGraph.java | 7 ++++---
src/site/markdown/userguide.md.vm | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3b002862/src/site/markdown/userguide.md.vm
----------------------------------------------------------------------