bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mme...@apache.org
Subject bookkeeper git commit: BOOKKEEPER-897: Fix findbugs warnings and missing apache license header
Date Tue, 23 Feb 2016 23:34:47 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master bac3ed360 -> 9bd9e061b


BOOKKEEPER-897: Fix findbugs warnings and missing apache license header

Author: Sijie Guo <sijie@apache.org>

Reviewers: Matteo Merli <mmerli@apache.org>

Closes #15 from sijie/sijie/BOOKKEEPER-897


Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/9bd9e061
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/9bd9e061
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/9bd9e061

Branch: refs/heads/master
Commit: 9bd9e061bc225f36d8c9d516d4265aa209e4e90e
Parents: bac3ed3
Author: Sijie Guo <sijie@apache.org>
Authored: Tue Feb 23 15:34:30 2016 -0800
Committer: Matteo Merli <mmerli@apache.org>
Committed: Tue Feb 23 15:34:30 2016 -0800

----------------------------------------------------------------------
 .../org/apache/bookkeeper/bookie/BookieShell.java  |  4 ++--
 .../bookie/LocalBookieEnsemblePlacementPolicy.java | 17 +++++++++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/9bd9e061/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java
index fca2164..c7ed2f8 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java
@@ -733,7 +733,7 @@ public class BookieShell implements Tool {
 
                 for (int i = 0; i < numberOfEntries; i++) {
                     String content = "entry-" + i;
-                    lh.addEntry(content.getBytes());
+                    lh.addEntry(content.getBytes(UTF_8));
                 }
 
                 LOG.info("Written {} entries in ledger {}", numberOfEntries, lh.getId());
@@ -749,7 +749,7 @@ public class BookieShell implements Tool {
                 int i = 0;
                 while (entries.hasMoreElements()) {
                     LedgerEntry entry = entries.nextElement();
-                    String actualMsg = new String(entry.getEntry());
+                    String actualMsg = new String(entry.getEntry(), UTF_8);
                     String expectedMsg = "entry-" + (i++);
                     if (!expectedMsg.equals(actualMsg)) {
                         throw new Exception("Failed validation of received message - Expected:
" + expectedMsg

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/9bd9e061/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LocalBookieEnsemblePlacementPolicy.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LocalBookieEnsemblePlacementPolicy.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LocalBookieEnsemblePlacementPolicy.java
index d1c41dd..2b18029 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LocalBookieEnsemblePlacementPolicy.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LocalBookieEnsemblePlacementPolicy.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.bookkeeper.bookie;
 
 import java.net.UnknownHostException;


Mime
View raw message