[GitHub] incubator-pirk pull request #115: PIRK-79

2016-10-30 Thread wraydulany
Github user wraydulany commented on a diff in the pull request:

https://github.com/apache/incubator-pirk/pull/115#discussion_r85686604
  
--- Diff: src/main/java/org/apache/pirk/test/utils/BaseTests.java ---
@@ -51,9 +51,9 @@
   public static final int dataPartitionBitSize = 8;
 
   // Selectors for domain and IP queries, queryIdentifier is the first 
entry for file generation
-  private static ArrayList selectorsDomain = new ArrayList<>(
+  public static ArrayList selectorsDomain = new ArrayList<>(
   Arrays.asList("s.t.u.net", "d.e.com", "r.r.r.r", "a.b.c.com", 
"something.else", "x.y.net"));
-  private static ArrayList selectorsIP = new 
ArrayList<>(Arrays.asList("55.55.55.55", "5.6.7.8", "10.20.30.40", 
"13.14.15.16", "21.22.23.24"));
+  public static ArrayList selectorsIP = new 
ArrayList<>(Arrays.asList("55.55.55.55", "5.6.7.8", "10.20.30.40", 
"13.14.15.16", "21.22.23.24"));
--- End diff --

Ditto.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-pirk pull request #115: PIRK-79

2016-10-30 Thread wraydulany
Github user wraydulany commented on a diff in the pull request:

https://github.com/apache/incubator-pirk/pull/115#discussion_r85686457
  
--- Diff: src/main/java/org/apache/pirk/encryption/Paillier.java ---
@@ -340,4 +342,41 @@ private String parametersToString()
 return "p = " + p.intValue() + " q = " + q.intValue() + " N = " + 
N.intValue() + " NSquared = " + NSquared.intValue() + " lambdaN = " + 
lambdaN.intValue()
 + " bitLength = " + bitLength;
   }
+
+  @Override public boolean equals(Object o)
+  {
+if (this == o)
+  return true;
+if (o == null || getClass() != o.getClass())
+  return false;
+
+Paillier paillier = (Paillier) o;
+
+if (bitLength != paillier.bitLength)
+  return false;
+if (!p.equals(paillier.p))
+  return false;
+if (!q.equals(paillier.q))
+  return false;
+if (!N.equals(paillier.N))
+  return false;
+if (!NSquared.equals(paillier.NSquared))
+  return false;
+if (!lambdaN.equals(paillier.lambdaN))
+  return false;
--- End diff --

I can, but it just leaves a blob of ORd-together stuff. I admit to knowing 
little about the java compiler; wouldn't it just optimize these into such a 
beast anyway? If so, then I feel like it's more aesthetically pleasing to just 
leave them separated. If not, well, screw that, and I'll change it; or if the 
community feels my subjective aesthetics aren't aesthetically pleasing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-pirk pull request #115: PIRK-79

2016-10-30 Thread wraydulany
Github user wraydulany commented on a diff in the pull request:

https://github.com/apache/incubator-pirk/pull/115#discussion_r85683430
  
--- Diff: 
src/test/java/org/apache/pirk/serialization/SerializationTest.java ---
@@ -75,6 +94,106 @@ public void testJavaSerDe() throws Exception
 Assert.assertTrue(deserializedDummyObject.equals(dummyRecord));
   }
 
+  @Test
+  public void testQuerierResponseSerializationDeserialization()
+  {
+testQuerierResponseSerializationDeserialization(jsonSerializer);
+testQuerierResponseSerializationDeserialization(javaSerializer);
--- End diff --

That line isn't in there twice. It's in there once with the arg 
jsonSerializer, and once with the arg javaSerializer. ;) Thus are both extant 
serialization services tested.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-pirk pull request #115: PIRK-79

2016-10-30 Thread smarthi
Github user smarthi commented on a diff in the pull request:

https://github.com/apache/incubator-pirk/pull/115#discussion_r85682681
  
--- Diff: src/main/java/org/apache/pirk/test/utils/BaseTests.java ---
@@ -51,9 +51,9 @@
   public static final int dataPartitionBitSize = 8;
 
   // Selectors for domain and IP queries, queryIdentifier is the first 
entry for file generation
-  private static ArrayList selectorsDomain = new ArrayList<>(
+  public static ArrayList selectorsDomain = new ArrayList<>(
--- End diff --

Include generic interface List<> on the LHS.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-pirk pull request #115: PIRK-79

2016-10-30 Thread smarthi
Github user smarthi commented on a diff in the pull request:

https://github.com/apache/incubator-pirk/pull/115#discussion_r85682703
  
--- Diff: src/main/java/org/apache/pirk/test/utils/BaseTests.java ---
@@ -51,9 +51,9 @@
   public static final int dataPartitionBitSize = 8;
 
   // Selectors for domain and IP queries, queryIdentifier is the first 
entry for file generation
-  private static ArrayList selectorsDomain = new ArrayList<>(
+  public static ArrayList selectorsDomain = new ArrayList<>(
   Arrays.asList("s.t.u.net", "d.e.com", "r.r.r.r", "a.b.c.com", 
"something.else", "x.y.net"));
-  private static ArrayList selectorsIP = new 
ArrayList<>(Arrays.asList("55.55.55.55", "5.6.7.8", "10.20.30.40", 
"13.14.15.16", "21.22.23.24"));
+  public static ArrayList selectorsIP = new 
ArrayList<>(Arrays.asList("55.55.55.55", "5.6.7.8", "10.20.30.40", 
"13.14.15.16", "21.22.23.24"));
--- End diff --

Generic interface List<> on LHS


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-pirk pull request #115: PIRK-79

2016-10-30 Thread jacobwil
Github user jacobwil commented on a diff in the pull request:

https://github.com/apache/incubator-pirk/pull/115#discussion_r85682254
  
--- Diff: 
src/test/java/org/apache/pirk/serialization/SerializationTest.java ---
@@ -75,6 +94,106 @@ public void testJavaSerDe() throws Exception
 Assert.assertTrue(deserializedDummyObject.equals(dummyRecord));
   }
 
+  @Test
+  public void testQuerierResponseSerializationDeserialization()
+  {
+testQuerierResponseSerializationDeserialization(jsonSerializer);
+testQuerierResponseSerializationDeserialization(javaSerializer);
--- End diff --

Is this line supposed to be here twice? If so, a comment as to why would be 
nice. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---