Repository: incubator-pirk
Updated Branches:
  refs/heads/master ec5104440 -> ef8d1c1a5


http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/SystemConfiguration.java 
b/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
index 5f100ad..b4db2a6 100755
--- a/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
+++ b/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.io.File;
@@ -24,9 +24,10 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Manages system properties. At first loading of this class, it will:
@@ -38,19 +39,19 @@ import org.apache.pirk.schema.query.LoadQuerySchemas;
  */
 public class SystemConfiguration
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(SystemConfiguration.class);
 
   private static final Properties props;
 
   /**
    * By default, if the pirk.properties file is found on the root of the 
classpath, it is loaded first.
    */
-  public static final String DEFAULT_PROPERTY_FILE = "pirk.properties";
+  private static final String DEFAULT_PROPERTY_FILE = "pirk.properties";
 
   /**
    * By default, if the local.pirk.properties file is found on the root of the 
classpath, it is loaded after pirk.properites.
    */
-  public static final String LOCAL_PROPERTY_FILE = "local.pirk.properties";
+  private static final String LOCAL_PROPERTY_FILE = "local.pirk.properties";
 
   static
   {
@@ -104,19 +105,11 @@ public class SystemConfiguration
     File localFile = new File(getProperty(LOCAL_PROPERTY_FILE));
     if (localFile.exists())
     {
-      try
+      try(InputStream stream = new FileInputStream(localFile);)
       {
-        InputStream stream = new FileInputStream(localFile);
-        if (stream != null)
-        {
-          logger.info("Loading local properties file '" + 
localFile.getAbsolutePath() + "'");
-          props.load(stream);
-          stream.close();
-        }
-        else
-        {
-          logger.info("No local configuration file found '" + 
localFile.getAbsolutePath() + "'");
-        }
+        logger.info("Loading local properties file '" + 
localFile.getAbsolutePath() + "'");
+        props.load(stream);
+        stream.close();
       } catch (IOException e)
       {
         logger.error("Problem loading local properties file '" + 
localFile.getAbsolutePath() + "'");

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/ISO8601DateParserTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/ISO8601DateParserTest.java 
b/src/test/java/test/general/ISO8601DateParserTest.java
index ac52027..b3d41aa 100644
--- a/src/test/java/test/general/ISO8601DateParserTest.java
+++ b/src/test/java/test/general/ISO8601DateParserTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,24 +15,23 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-
 import java.text.ParseException;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.utils.ISO8601DateParser;
-import org.apache.pirk.utils.LogUtils;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Class to test basic functionality of ISO8601DateParser class
  */
 public class ISO8601DateParserTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(ISO8601DateParserTest.class);
 
   @Test
   public void testDateParsing() throws ParseException

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/KeyedHashTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/KeyedHashTest.java 
b/src/test/java/test/general/KeyedHashTest.java
index 7df71ec..131e18f 100644
--- a/src/test/java/test/general/KeyedHashTest.java
+++ b/src/test/java/test/general/KeyedHashTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,15 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-
-import org.apache.log4j.Logger;
 import org.apache.pirk.utils.KeyedHash;
-import org.apache.pirk.utils.LogUtils;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Basic functional tests for KeyedHash
@@ -31,7 +30,7 @@ import org.junit.Test;
  */
 public class KeyedHashTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(KeyedHashTest.class);
 
   @Test
   public void testKeyedHash()

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/PaillierTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/PaillierTest.java 
b/src/test/java/test/general/PaillierTest.java
index 7ca4623..ce86285 100644
--- a/src/test/java/test/general/PaillierTest.java
+++ b/src/test/java/test/general/PaillierTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,22 +15,20 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 import java.math.BigInteger;
 import java.util.Random;
 
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-import org.apache.pirk.utils.LogUtils;
+import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
-import org.apache.pirk.encryption.Paillier;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * Basic test functionality for Paillier library
@@ -38,22 +36,22 @@ import org.apache.pirk.encryption.Paillier;
  */
 public class PaillierTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(PaillierTest.class);
 
-  BigInteger p = null; // large prime
-  BigInteger q = null; // large prime
-  BigInteger N = null; // N=pq, RSA modulus
-  BigInteger NSquared = null; // N^2
-  BigInteger lambdaN = null; // lambda(N) = lcm(p-1,q-1)
+  private BigInteger p = null; // large prime
+  private BigInteger q = null; // large prime
+  private BigInteger N = null; // N=pq, RSA modulus
+  private BigInteger NSquared = null; // N^2
+  private BigInteger lambdaN = null; // lambda(N) = lcm(p-1,q-1)
 
-  int bitLength = 0; // bit length of the modulus N
-  int certainty = 64; // prob that new BigInteger values represents primes 
will exceed (1 - (1/2)^certainty)
+  private int bitLength = 0; // bit length of the modulus N
+  private int certainty = 64; // prob that new BigInteger values represents 
primes will exceed (1 - (1/2)^certainty)
 
-  BigInteger r1 = null; // random number in (Z/NZ)*
-  BigInteger r2 = null; // random number in (Z/NZ)*
+  private BigInteger r1 = null; // random number in (Z/NZ)*
+  private BigInteger r2 = null; // random number in (Z/NZ)*
 
-  BigInteger m1 = null; // message to encrypt
-  BigInteger m2 = null; // message to encrypt
+  private BigInteger m1 = null; // message to encrypt
+  private BigInteger m2 = null; // message to encrypt
 
   public PaillierTest()
   {
@@ -85,42 +83,42 @@ public class PaillierTest
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(2), 
BigInteger.valueOf(2), 128);
       fail("Paillier constructor did not throw PIRException for p,q < 3");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(2), 
BigInteger.valueOf(3), 128);
       fail("Paillier constructor did not throw PIRException for p < 3");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(3), 
BigInteger.valueOf(2), 128);
       fail("Paillier constructor did not throw PIRException for q < 3");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(7), 
BigInteger.valueOf(7), 128);
       fail("Paillier constructor did not throw PIRException for p = q");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(8), 
BigInteger.valueOf(7), 128);
       fail("Paillier constructor did not throw PIRException for p not prime");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(7), 
BigInteger.valueOf(10), 128);
       fail("Paillier constructor did not throw PIRException for q not prime");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
@@ -128,7 +126,7 @@ public class PaillierTest
       int systemPrimeCertainty = 
Integer.parseInt(SystemConfiguration.getProperty("pir.primeCertainty", "128"));
       Paillier paillier = new Paillier(3072, systemPrimeCertainty - 10);
       fail("Paillier constructor did not throw PIRException for certainty less 
than system default of " + systemPrimeCertainty);
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
@@ -136,7 +134,7 @@ public class PaillierTest
       Paillier pailler = new Paillier(p, q, bitLength);
       BigInteger encM1 = pailler.encrypt(N);
       fail("Paillier encryption did not throw PIRException for message m = N");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
@@ -144,21 +142,21 @@ public class PaillierTest
       Paillier pailler = new Paillier(p, q, bitLength);
       BigInteger encM1 = pailler.encrypt(N.add(BigInteger.TEN));
       fail("Paillier encryption did not throw PIRException for message m > N");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier pailler = new Paillier(bitLength, 128, bitLength);
       fail("Paillier constructor did not throw PIRException for ensureBitSet = 
bitLength");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier pailler = new Paillier(bitLength, 128, bitLength + 1);
       fail("Paillier constructor did not throw PIRException for ensureBitSet > 
bitLength");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/PartitionUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/PartitionUtilsTest.java 
b/src/test/java/test/general/PartitionUtilsTest.java
index 03ceef2..1ee866a 100644
--- a/src/test/java/test/general/PartitionUtilsTest.java
+++ b/src/test/java/test/general/PartitionUtilsTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,35 +15,32 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 import java.math.BigInteger;
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.ISO8601DatePartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * Class to functionally test the bit conversion utils
  */
 public class PartitionUtilsTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
-
-  PrimitiveTypePartitioner primitivePartitioner = null;
+  private static final Logger logger = 
LoggerFactory.getLogger(PartitionUtilsTest.class);
 
   public PartitionUtilsTest()
   {
-    primitivePartitioner = new PrimitiveTypePartitioner();
+    PrimitiveTypePartitioner primitivePartitioner = new 
PrimitiveTypePartitioner();
   }
 
   @Test
@@ -113,7 +110,7 @@ public class PartitionUtilsTest
 
       fail("BitConversionUtils.partitionBits did not throw error for 
mismatched partitionSize and mask size");
 
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     logger.info("Successfully completed testPartitionBits");
@@ -158,7 +155,7 @@ public class PartitionUtilsTest
     SystemConfiguration.setProperty("pir.stringBits", stringBits);
 
     // Test short
-    short shortTest = new Short("2456").shortValue();
+    short shortTest = new Short("2456");
     ArrayList<BigInteger> partsShort = 
primitivePartitioner.toPartitions(shortTest, PrimitiveTypePartitioner.SHORT);
     assertEquals(2, partsShort.size());
     assertEquals(shortTest, primitivePartitioner.fromPartitions(partsShort, 0, 
PrimitiveTypePartitioner.SHORT));

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/QueryParserUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/QueryParserUtilsTest.java 
b/src/test/java/test/general/QueryParserUtilsTest.java
index ab21f51..af2235c 100644
--- a/src/test/java/test/general/QueryParserUtilsTest.java
+++ b/src/test/java/test/general/QueryParserUtilsTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,38 +15,37 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import java.util.ArrayList;
 import java.util.Map;
 
 import org.apache.hadoop.io.MapWritable;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.test.utils.Inputs;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.QueryParserUtils;
 import org.apache.pirk.utils.StringUtils;
 import org.json.simple.JSONObject;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Class for testing the QueryParser methods
  */
 public class QueryParserUtilsTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(QueryParserUtilsTest.class);
 
-  MapWritable doc = null; // MapWritable with arrays in json string 
representation
-  MapWritable docWAW = null; // MapWritable with arrays as 
WritableArrayWritable objects
-  Map<String,Object> docMap = null; // arrays as ArrayList<String>
+  private MapWritable doc = null; // MapWritable with arrays in json string 
representation
+  private MapWritable docWAW = null; // MapWritable with arrays as 
WritableArrayWritable objects
+  private Map<String,Object> docMap = null; // arrays as ArrayList<String>
 
-  DataSchema dSchema = null;
+  private DataSchema dSchema = null;
 
   public QueryParserUtilsTest() throws Exception
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/schema/data/LoadDataSchemaTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/schema/data/LoadDataSchemaTest.java 
b/src/test/java/test/schema/data/LoadDataSchemaTest.java
index f729418..361442a 100644
--- a/src/test/java/test/schema/data/LoadDataSchemaTest.java
+++ b/src/test/java/test/schema/data/LoadDataSchemaTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,13 +15,9 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.schema.data;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import java.io.File;
 import java.io.IOException;
 
@@ -32,30 +28,33 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
 import org.apache.pirk.test.utils.TestUtils;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * Test suite for LoadDataSchema and DataSchema
  */
 public class LoadDataSchemaTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static Logger logger = 
LoggerFactory.getLogger(LoadDataSchemaTest.class);
 
-  String dataSchemaName = "fakeDataSchema";
+  private String dataSchemaName = "fakeDataSchema";
 
-  String element1 = "elementName1";
-  String element2 = "elementName2";
-  String element3 = "elementName3";
+  private String element1 = "elementName1";
+  private String element2 = "elementName2";
+  private String element3 = "elementName3";
 
   @Test
   public void testGeneralSchemaLoad() throws Exception
@@ -137,7 +136,7 @@ public class LoadDataSchemaTest
       // Force the schema to load
       LoadDataSchemas.initialize();
       fail("LoadDataSchemas did not throw exception for incorrect javaType");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original data.schemas property
@@ -168,7 +167,7 @@ public class LoadDataSchemaTest
       // Force the schema to load
       LoadDataSchemas.initialize();
       fail("LoadDataSchemas did not throw exception for unknown partitioner");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original data.schemas property

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/schema/query/LoadQuerySchemaTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/schema/query/LoadQuerySchemaTest.java 
b/src/test/java/test/schema/query/LoadQuerySchemaTest.java
index a21a25a..c1a5d9e 100644
--- a/src/test/java/test/schema/query/LoadQuerySchemaTest.java
+++ b/src/test/java/test/schema/query/LoadQuerySchemaTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,15 +15,13 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.schema.query;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -33,7 +31,6 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
@@ -42,30 +39,34 @@ import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.schema.query.filter.StopListFilter;
 import org.apache.pirk.test.utils.Inputs;
 import org.apache.pirk.test.utils.TestUtils;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import test.schema.data.LoadDataSchemaTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * Test suite for LoadQuerySchema and QuerySchema
  */
 public class LoadQuerySchemaTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(LoadDataSchemaTest.class);
 
-  String querySchemaFile = "querySchemaFile";
-  String dataSchemaName = "fakeDataSchema";
-  String querySchemaName = "fakeQuerySchema";
+  private String querySchemaFile = "querySchemaFile";
+  private String dataSchemaName = "fakeDataSchema";
+  private String querySchemaName = "fakeQuerySchema";
 
-  String element1 = "elementName1";
-  String element2 = "elementName2";
-  String element3 = "elementName3";
-  String element4 = "elementName4";
+  private String element1 = "elementName1";
+  private String element2 = "elementName2";
+  private String element3 = "elementName3";
+  private String element4 = "elementName4";
 
-  List<String> queryElements = Arrays.asList(element1, element2, element3);
-  List<String> filterElements = Arrays.asList(element2);
+  private List<String> queryElements = Arrays.asList(element1, element2, 
element3);
+  private List<String> filterElements = Collections.singletonList(element2);
 
   @Test
   public void testGeneralSchemaLoad() throws Exception
@@ -191,7 +192,7 @@ public class LoadQuerySchemaTest
     {
       LoadQuerySchemas.initialize();
       fail("LoadQuerySchemas did not throw exception for bogus filter class");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original query and data schema properties
@@ -234,7 +235,7 @@ public class LoadQuerySchemaTest
     {
       LoadQuerySchemas.initialize();
       fail("LoadQuerySchemas did not throw exception for non-existent 
DataSchema");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original query properties and force to load
@@ -282,7 +283,7 @@ public class LoadQuerySchemaTest
     {
       LoadQuerySchemas.initialize();
       fail("LoadQuerySchemas did not throw exception for non-existent 
selectorName");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original query and data schema properties

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/wideskies/standalone/StandaloneTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/wideskies/standalone/StandaloneTest.java 
b/src/test/java/test/wideskies/standalone/StandaloneTest.java
index b238f7c..cfcaa7a 100644
--- a/src/test/java/test/wideskies/standalone/StandaloneTest.java
+++ b/src/test/java/test/wideskies/standalone/StandaloneTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * 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
@@ -15,19 +15,19 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- 
*******************************************************************************/
+ */
 package test.wideskies.standalone;
 
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.query.filter.StopListFilter;
 import org.apache.pirk.test.utils.BaseTests;
 import org.apache.pirk.test.utils.Inputs;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Functional test suite for stand alone testing - non Spark applications
@@ -41,11 +41,11 @@ import org.junit.Test;
  */
 public class StandaloneTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = 
LoggerFactory.getLogger(StandaloneTest.class);
 
   private static final String STOPLIST_FILE = "testStopListFile";
 
-  String stopListFileProp = null;
+  private String stopListFileProp = null;
 
   public StandaloneTest() throws Exception
   {

Reply via email to