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 2019/09/10 09:19:25 UTC

[jena] branch master updated: JENA-1753: Cleanup

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 803f409  JENA-1753: Cleanup
     new 71d23d7  Merge pull request #601 from afs/cleanup
803f409 is described below

commit 803f409a7dab08bea0894f7a95bf4725cb6c3f5c
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Sat Sep 7 20:58:02 2019 +0100

    JENA-1753: Cleanup
---
 .../org/apache/jena/fuseki/system/FusekiNetLib.java     |  3 +--
 .../java/org/apache/jena/tdb/base/block/BlockType.java  |  2 --
 .../org/apache/jena/tdb/index/bplustree/BPTreeNode.java |  6 ------
 .../apache/jena/tdb/index/bplustree/BPTreeNodeMgr.java  |  5 -----
 .../apache/jena/tdb/index/bplustree/BPTreeRecords.java  |  1 -
 .../org/apache/jena/tdb/index/bplustree/BPlusTree.java  |  3 ---
 .../org/apache/jena/tdb/index/ext/HashBucketMgr.java    | 17 ++++++-----------
 .../jena/tdb/transaction/ObjectFileTransComplex.java    |  4 +---
 8 files changed, 8 insertions(+), 33 deletions(-)

diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiNetLib.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiNetLib.java
index f9f9ab4..a44d1bd 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiNetLib.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiNetLib.java
@@ -81,8 +81,7 @@ public class FusekiNetLib {
         return sb.toString();
     }
 
-
-    /** Helper function for displayign an HttpServletRequest */
+    /** Helper function for displaying an HttpServletRequest */
     public static String fmtRequest(HttpServletRequest request) {
         StringBuffer sbuff = new StringBuffer();
         sbuff.append(request.getMethod());
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockType.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockType.java
index d1182ac..54301ed 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockType.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockType.java
@@ -32,8 +32,6 @@ public enum BlockType implements Printable, Named
     BPTREE_LEAF(7, "BPlusTreeLeaf") ,
     DICTIONARY(10, "Dictionary") ,
     RECORD_BLOCK(99, "RecordBlock"),
-    
-    // [TxTDB:PATCH-UP]
     UNDEF(-2, "UndefinedBlockType")
     ;
 
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
index fe05e91..fcae4c6 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
@@ -142,9 +142,6 @@ public final class BPTreeNode extends BPTreePage
         BPTreeNodeMgr.formatBPTreeNode(this, bpTree, block, isLeaf, parent, count) ;
     }
     
-    // [TxTDB:PATCH-UP] REMOVE
-    //private BPTreePage get(int idx) { return get(idx, WRITE) ; }
-    
     /** Get the page at slot idx - switch between B+Tree and records files */ 
     private BPTreePage get(int idx, short state)
     {
@@ -167,7 +164,6 @@ public final class BPTreeNode extends BPTreePage
     
     private BPTreePage getMgrWrite(int subId)
     {
-        // [TxTDB:PATCH-UP]
         if ( isLeaf )
             return bpTree.getRecordsMgr().getWrite(subId) ;
         else
@@ -190,7 +186,6 @@ public final class BPTreeNode extends BPTreePage
     /** Insert a record - return existing value if any, else null */
     public static Record insert(BPTreeNode root, Record record)
     {
-        // [TxTDB:PATCH-UP] - put in BPlusTree.
         if ( logging() )
         {
             log.debug(format("** insert(%s) / start", record)) ;
@@ -814,7 +809,6 @@ public final class BPTreeNode extends BPTreePage
         
         BPTreePage left = null ;
         if ( idx > 0 )
-            // [TxTDB:PATCH-UP] 
             // release on left
             left = get(idx-1, WRITE) ;
         
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNodeMgr.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNodeMgr.java
index 22c340f..b5b25c2 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNodeMgr.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNodeMgr.java
@@ -51,10 +51,8 @@ public final class BPTreeNodeMgr extends BPTreePageMgr<BPTreeNode>
         
         BPTreePage recordsPage = bpTree.getRecordsMgr().create() ;
         if ( recordsPage.getId() != BPlusTreeParams.RootId )
-            // [TxTDB:PATCH-UP]
             throw new TDBException("Root blocks must be at position zero (got "+recordsPage.getId()+")") ;
         // Empty data block.
-        // [TxTDB:PATCH-UP]
         recordsPage.write();
         recordsPage.release() ;
         
@@ -101,7 +99,6 @@ public final class BPTreeNodeMgr extends BPTreePageMgr<BPTreeNode>
     /** Fetch a block - fill in the parent id, which is not in the on-disk bytes */
     public BPTreeNode getRead(int id, int parent)
     {
-        // [TxTDB:PATCH-UP]
         BPTreeNode n = super.getRead(id) ;
         n.parent = parent ;
         return n ;
@@ -110,7 +107,6 @@ public final class BPTreeNodeMgr extends BPTreePageMgr<BPTreeNode>
     /** Fetch a block - fill in the parent id, which is not in the on-disk bytes */
     public BPTreeNode getWrite(int id, int parent)
     {
-        // [TxTDB:PATCH-UP]
         BPTreeNode n = super.getWrite(id) ;
         n.parent = parent ;
         return n ;
@@ -131,7 +127,6 @@ public final class BPTreeNodeMgr extends BPTreePageMgr<BPTreeNode>
         @Override
         public BPTreeNode fromBlock(Block block)
         {
-            // [TxTDB:PATCH-UP]
             // synchronized - needed for multiple reader? 
             synchronized (block)
             {
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeRecords.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeRecords.java
index 8a69841..462c0c6 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeRecords.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeRecords.java
@@ -126,7 +126,6 @@ public final class BPTreeRecords extends BPTreePage
     @Override
     public Record internalInsert(Record record)
     {
-        // [TxTDB:PATCH-UP]
         promote() ;
         int i = rBuff.find(record) ;
         Record r2 = null ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
index d273c1e..9875f2d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
@@ -206,8 +206,6 @@ public class BPlusTree implements Iterable<Record>, RangeIndex
         //if ( ! nodeManager.getBlockMgr().isEmpty() )
         {
             // Create as does not exist.
-            // [TxTDB:PATCH-UP]
-            // ** Better: seperate "does it exist? - create statics used in factory"
             startUpdateBlkMgr() ;
             // Fresh BPlusTree
             rootIdx = nodeManager.createEmptyBPT() ;
@@ -241,7 +239,6 @@ public class BPlusTree implements Iterable<Record>, RangeIndex
 
     private void releaseRoot(BPTreeNode rootNode)
     {
-//        // [TxTDB:PATCH-UP]
 //        if ( root != null )
 //        {
 //            root.release() ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/HashBucketMgr.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/HashBucketMgr.java
index 0c1d268..32b93bc 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/HashBucketMgr.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/HashBucketMgr.java
@@ -32,7 +32,6 @@ import org.apache.jena.tdb.base.page.PageBlockMgr ;
 import org.apache.jena.tdb.base.record.RecordException ;
 import org.apache.jena.tdb.base.record.RecordFactory ;
 
-
 public class HashBucketMgr extends PageBlockMgr<HashBucket>
 {
     public HashBucketMgr(RecordFactory factory, BlockMgr blockMgr)
@@ -49,8 +48,7 @@ public class HashBucketMgr extends PageBlockMgr<HashBucket>
         bucket.setTrieLength(hashBitLen) ;
         return bucket ;
     }
-    
-    // [TxTDB:PATCH-UP]
+
     @Override
     public HashBucket getWrite(int id)
     { 
@@ -58,23 +56,20 @@ public class HashBucketMgr extends PageBlockMgr<HashBucket>
         page.getBackingBlock().setModified(true) ;
         return page ;
     }
-    // [TxTDB:PATCH-UP]
+
     @Override
     public HashBucket getRead(int id)        { return _get(id) ; }
-    
-    // [TxTDB:PATCH-UP]
+
     //@Override
     public HashBucket get(int id)        { return getWrite(id) ; }
-    
-   
+
     public HashBucket _get(int id)
     {
-        // [TxTDB:PATCH-UP]
         HashBucket bucket = super.getWrite(id) ;
         // Link and Count are in the block and got done by the converter.
         return bucket ;
     }
-    
+
     private static class Block2HashBucketMgr implements BlockConverter<HashBucket>
     {
         private RecordFactory factory ;
@@ -83,7 +78,7 @@ public class HashBucketMgr extends PageBlockMgr<HashBucket>
         {
             this.factory = factory ;
         }
-        
+
         @Override
         public HashBucket createFromBlock(Block block, BlockType blkType)
         {
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/ObjectFileTransComplex.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/ObjectFileTransComplex.java
index 1683820..f7e3dc4 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/ObjectFileTransComplex.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/ObjectFileTransComplex.java
@@ -34,7 +34,7 @@ import org.apache.jena.tdb.base.objectfile.ObjectFile ;
  * 
  * To flush, it writes the journal to the base file.
  * 
- * It is relatively untested. Thisis not the normal implementation of a transactional
+ * It is relatively untested. This is not the normal implementation of a transactional
  * ObjectFile.
  * 
  * @see ObjectFileTrans
@@ -55,8 +55,6 @@ public class ObjectFileTransComplex implements ObjectFile, TransactionLifecycle
         this.base = base ;
         this.transObjects = other ;
         inTransaction = false ;
-
-        //  [TxTDB:PATCH-UP] Begin is not being called.
         this.otherAllocOffset = base.length() ;
         //Log.info(this, getLabel()+": otherAllocOffset = "+otherAllocOffset) ;
     }