You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/02/14 22:44:23 UTC
[1/2] jena git commit: Typo. Include old code for reference.
Repository: jena
Updated Branches:
refs/heads/master a9762976e -> 67658cb28
Typo. Include old code for reference.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/67658cb2
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/67658cb2
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/67658cb2
Branch: refs/heads/master
Commit: 67658cb28875128d1906b86f02821948f828c9de
Parents: d6210e7
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Feb 14 21:35:44 2016 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Feb 14 21:36:15 2016 +0000
----------------------------------------------------------------------
jena-core/src/main/java/org/apache/jena/mem/HashCommon.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/67658cb2/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java b/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
index b33d1b2..e6100b0 100644
--- a/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
+++ b/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
@@ -217,8 +217,8 @@ public abstract class HashCommon<Key>
if ( prime > atLeast )
return prime;
}
- // If not found, complain.
- // Theer are some very large numbers in the primes table.
+ //return atLeast ; // Input is 2*current capacity.
+ // There are some very large numbers in the primes table.
throw new JenaException("Failed to find a 'next size': atleast = "+atLeast) ;
}
[2/2] jena git commit: Rename padInt as padInternal
Posted by an...@apache.org.
Rename padInt as padInternal
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d6210e71
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d6210e71
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d6210e71
Branch: refs/heads/master
Commit: d6210e7184606da5bfee3bc3695e4620cce03a56
Parents: a976297
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Feb 14 21:34:59 2016 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Feb 14 21:36:15 2016 +0000
----------------------------------------------------------------------
.../apache/jena/atlas/io/IndentedWriter.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/d6210e71/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
----------------------------------------------------------------------
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java b/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
index 224633f..0cbc7ff 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
@@ -54,7 +54,7 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
protected boolean lineNumbers = false ;
protected boolean startingNewLine = true ;
private char padChar = ' ' ;
- private String endOfLineMarker = null ; // Null mean none.
+ private String endOfLineMarker = null ; // Null means none.
private String padString = null ;
protected boolean flatMode = false ;
@@ -182,8 +182,9 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
row++ ;
column = 0 ;
// Note that PrintWriters do not autoflush by default
- // so if layered over a PrintWirter, need to flush that as well.
- if (flushOnNewline) flush() ;
+ // so if layered over a PrintWriter, need to flush that as well.
+ if (flushOnNewline)
+ flush() ;
}
private boolean atStartOfLine() { return column <= currentIndent ; }
@@ -195,17 +196,17 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
}
@Override
- public void close() { try { out.close(); } catch (IOException ex) {} }
+ public void close() { IO.close(out) ; }
@Override
- public void flush() { try { out.flush(); } catch (IOException ex) {} }
+ public void flush() { IO.flush(out); }
/** Pad to the indent (if we are before it) */
public void pad()
{
if ( startingNewLine && currentIndent > 0 )
lineStart() ;
- padInt() ;
+ padInternal() ;
}
/** Pad to a given number of columns EXCLUDING the indent.
@@ -233,7 +234,7 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
}
- private void padInt()
+ private void padInternal()
{
if ( padString == null )
{
@@ -301,7 +302,8 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
/** Flush on newline **/
public boolean getFlushOnNewline() { return flushOnNewline; }
- public void setFlushOnNewline(boolean flushOnNewline) { this.flushOnNewline = flushOnNewline; }
+ public void setFlushOnNewline(boolean flushOnNewline)
+ { this.flushOnNewline = flushOnNewline; }
public char getPadChar() { return padChar ; }
public void setPadChar(char ch) { this.padChar = ch ; }
@@ -339,7 +341,7 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
// so that a final blank does not cause a line number
if ( startingNewLine )
insertLineNumber() ;
- padInt() ;
+ padInternal() ;
startingNewLine = false ;
}