You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ki...@apache.org on 2018/12/29 21:52:36 UTC

[jena] 01/03: JENA-204: replace StringBuffer by StringBuilder

This is an automated email from the ASF dual-hosted git repository.

kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jena.git

commit d0eae1eaba7743a536784521ae985b8b9eed228c
Author: Bruno P. Kinoshita <ki...@apache.org>
AuthorDate: Sat Dec 29 19:47:15 2018 +1300

    JENA-204: replace StringBuffer by StringBuilder
---
 jena-cmds/src/main/java/jena/schemagen.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/jena-cmds/src/main/java/jena/schemagen.java b/jena-cmds/src/main/java/jena/schemagen.java
index 357f057..4ac22da 100644
--- a/jena-cmds/src/main/java/jena/schemagen.java
+++ b/jena-cmds/src/main/java/jena/schemagen.java
@@ -432,7 +432,7 @@ public class schemagen {
     }
 
     /** Add the appropriate indent to a buffer */
-    protected int indentTo( int i, StringBuffer buf ) {
+    protected int indentTo( int i, StringBuilder buf ) {
         int indent = i * m_indentStep;
         for (int j = 0;  j < indent; j++) {
             buf.append( ' ' );
@@ -463,7 +463,7 @@ public class schemagen {
 
     /** Determine the list of imports to include in the file */
     protected String getImports() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append( "import org.apache.jena.rdf.model.*;" );
         buf.append( m_nl );
 
@@ -538,7 +538,7 @@ public class schemagen {
 
     /** Converts to a legal Java identifier; capitalise first char if cap is true */
     protected String asLegalJavaID( String s, boolean cap ) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         int i = 0;
 
         // treat the first character specially - must be able to start a Java ID, may have to up-case
@@ -1159,7 +1159,7 @@ public class schemagen {
 
     /** Answer all of the commentary on the given resource, as a string */
     protected String getComment( Resource r ) {
-        StringBuffer comment = new StringBuffer();
+        StringBuilder comment = new StringBuilder();
 
         // collect any RDFS or DAML comments attached to the node
         for (NodeIterator ni = m_source.listObjectsOfProperty( r, RDFS.comment );  ni.hasNext(); ) {
@@ -1177,7 +1177,7 @@ public class schemagen {
 
     /** Format the comment as Javadoc, and limit the line width */
     protected String formatComment( String comment ) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append( "/** <p>" );
 
         boolean inSpace = false;
@@ -1330,7 +1330,7 @@ public class schemagen {
 
     /** Answer the local name of resource r mapped to upper case */
     protected String getUCValueName( Resource r ) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         String localName = r.getLocalName();
         char lastChar = 0;