From 2575366192ade32b757918674a4c94c5b174cf98 Mon Sep 17 00:00:00 2001 From: liningrui Date: Tue, 5 Nov 2019 10:23:13 +0800 Subject: [PATCH] tiny improve Change-Id: Ib1d39186e1f66471a02654d3e7e29665e07f4f56 --- .../com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java | 2 +- .../src/main/java/com/baidu/hugegraph/cmd/InitStore.java | 2 +- .../src/main/java/com/baidu/hugegraph/example/Example1.java | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java index 90777fa6b3..211cbff7a9 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java @@ -511,7 +511,7 @@ private PageIds doIndexQueryOnce(IndexLabel indexLabel, Set ids = InsertionOrderUtil.newSet(); Iterator entries = super.query(query).iterator(); - while(entries.hasNext()) { + while (entries.hasNext()) { HugeIndex index = this.serializer.readIndex(graph(), query, entries.next()); ids.addAll(index.elementIds()); diff --git a/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java b/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java index 1002483676..4ca05898b3 100644 --- a/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java +++ b/hugegraph-dist/src/main/java/com/baidu/hugegraph/cmd/InitStore.java @@ -134,6 +134,6 @@ private static void initBackend(final HugeGraph graph) throw e; } break; - } while(retries-- > 0); + } while (retries-- > 0); } } diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java index 560056f273..a817a7665f 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java @@ -241,7 +241,6 @@ public static void loadData(final HugeGraph graph) { try { tx.rollback(); } catch (BackendException e2) { - // TODO Auto-generated catch block e2.printStackTrace(); } } finally {