You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2019/06/13 14:32:22 UTC

[lucene-solr] branch jira/SOLR-13452_gradle_3 updated (0601f51 -> a079983)

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

markrmiller pushed a change to branch jira/SOLR-13452_gradle_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from 0601f51  SOLR-13452: Commit updated generated solr queryparser so that FastCharStream changes compile.
     new 6f884a9  SOLR-13452: Re enable Lucene test that was failing early on.
     new a079983  SOLR-13452: Add comment on why kerby-pkix is excluded.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/lucene/util/TestVirtualMethod.java  | 158 ++++++++++-----------
 solr/core/build.gradle                             |   2 +-
 2 files changed, 80 insertions(+), 80 deletions(-)


[lucene-solr] 01/02: SOLR-13452: Re enable Lucene test that was failing early on.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch jira/SOLR-13452_gradle_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 6f884a9fa190bc65f5f52df9e92b000f3f9f6f9b
Author: markrmiller <ma...@apache.org>
AuthorDate: Thu Jun 13 09:31:48 2019 -0500

    SOLR-13452: Re enable Lucene test that was failing early on.
---
 .../org/apache/lucene/util/TestVirtualMethod.java  | 158 ++++++++++-----------
 1 file changed, 79 insertions(+), 79 deletions(-)

diff --git a/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java b/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
index e4d366c..4dfe86b 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
@@ -14,82 +14,82 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-//package org.apache.lucene.util;
-//
-//public class TestVirtualMethod extends LuceneTestCase {
-//
-//  private static final VirtualMethod<TestVirtualMethod> publicTestMethod =
-//    new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
-//  private static final VirtualMethod<TestVirtualMethod> protectedTestMethod =
-//    new VirtualMethod<>(TestVirtualMethod.class, "protectedTest", int.class);
-//
-//  public void publicTest(String test) {}
-//  protected void protectedTest(int test) {}
-//  
-//  static class TestClass1 extends TestVirtualMethod {
-//    @Override
-//    public void publicTest(String test) {}
-//    @Override
-//    protected void protectedTest(int test) {}
-//  }
-//
-//  static class TestClass2 extends TestClass1 {
-//    @Override // make it public here
-//    public void protectedTest(int test) {}
-//  }
-//
-//  static class TestClass3 extends TestClass2 {
-//    @Override
-//    public void publicTest(String test) {}
-//  }
-//
-//  static class TestClass4 extends TestVirtualMethod {
-//  }
-//
-//  static class TestClass5 extends TestClass4 {
-//  }
-//
-//  public void testGeneral() {
-//    assertEquals(0, publicTestMethod.getImplementationDistance(this.getClass()));
-//    assertEquals(1, publicTestMethod.getImplementationDistance(TestClass1.class));
-//    assertEquals(1, publicTestMethod.getImplementationDistance(TestClass2.class));
-//    assertEquals(3, publicTestMethod.getImplementationDistance(TestClass3.class));
-//    assertFalse(publicTestMethod.isOverriddenAsOf(TestClass4.class));
-//    assertFalse(publicTestMethod.isOverriddenAsOf(TestClass5.class));
-//    
-//    assertEquals(0, protectedTestMethod.getImplementationDistance(this.getClass()));
-//    assertEquals(1, protectedTestMethod.getImplementationDistance(TestClass1.class));
-//    assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass2.class));
-//    assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass3.class));
-//    assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass4.class));
-//    assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass5.class));
-//    
-//    assertTrue(VirtualMethod.compareImplementationDistance(TestClass3.class, publicTestMethod, protectedTestMethod) > 0);
-//    assertEquals(0, VirtualMethod.compareImplementationDistance(TestClass5.class, publicTestMethod, protectedTestMethod));
-//  }
-//
-//  @SuppressWarnings({"rawtypes","unchecked"})
-//  public void testExceptions() {
-//    // LuceneTestCase is not a subclass and can never override publicTest(String)
-//    expectThrows(IllegalArgumentException.class, () -> {
-//      // cast to Class to remove generics:
-//      publicTestMethod.getImplementationDistance((Class) LuceneTestCase.class);
-//    });
-//    
-//    // Method bogus() does not exist, so IAE should be thrown
-//    expectThrows(IllegalArgumentException.class, () -> {
-//      new VirtualMethod<>(TestVirtualMethod.class, "bogus");
-//    });
-//    
-//    // Method publicTest(String) is not declared in TestClass2, so IAE should be thrown
-//    expectThrows(IllegalArgumentException.class, () -> {
-//      new VirtualMethod<>(TestClass2.class, "publicTest", String.class);
-//    });
-//
-//    // try to create a second instance of the same baseClass / method combination
-//    expectThrows(UnsupportedOperationException.class, () -> {
-//      new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
-//    });
-//  }
-//  
-//}
+package org.apache.lucene.util;
+
+public class TestVirtualMethod extends LuceneTestCase {
+
+  private static final VirtualMethod<TestVirtualMethod> publicTestMethod =
+    new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
+  private static final VirtualMethod<TestVirtualMethod> protectedTestMethod =
+    new VirtualMethod<>(TestVirtualMethod.class, "protectedTest", int.class);
+
+  public void publicTest(String test) {}
+  protected void protectedTest(int test) {}
+  
+  static class TestClass1 extends TestVirtualMethod {
+    @Override
+    public void publicTest(String test) {}
+    @Override
+    protected void protectedTest(int test) {}
+  }
+
+  static class TestClass2 extends TestClass1 {
+    @Override // make it public here
+    public void protectedTest(int test) {}
+  }
+
+  static class TestClass3 extends TestClass2 {
+    @Override
+    public void publicTest(String test) {}
+  }
+
+  static class TestClass4 extends TestVirtualMethod {
+  }
+
+  static class TestClass5 extends TestClass4 {
+  }
+
+  public void testGeneral() {
+    assertEquals(0, publicTestMethod.getImplementationDistance(this.getClass()));
+    assertEquals(1, publicTestMethod.getImplementationDistance(TestClass1.class));
+    assertEquals(1, publicTestMethod.getImplementationDistance(TestClass2.class));
+    assertEquals(3, publicTestMethod.getImplementationDistance(TestClass3.class));
+    assertFalse(publicTestMethod.isOverriddenAsOf(TestClass4.class));
+    assertFalse(publicTestMethod.isOverriddenAsOf(TestClass5.class));
+    
+    assertEquals(0, protectedTestMethod.getImplementationDistance(this.getClass()));
+    assertEquals(1, protectedTestMethod.getImplementationDistance(TestClass1.class));
+    assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass2.class));
+    assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass3.class));
+    assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass4.class));
+    assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass5.class));
+    
+    assertTrue(VirtualMethod.compareImplementationDistance(TestClass3.class, publicTestMethod, protectedTestMethod) > 0);
+    assertEquals(0, VirtualMethod.compareImplementationDistance(TestClass5.class, publicTestMethod, protectedTestMethod));
+  }
+
+  @SuppressWarnings({"rawtypes","unchecked"})
+  public void testExceptions() {
+    // LuceneTestCase is not a subclass and can never override publicTest(String)
+    expectThrows(IllegalArgumentException.class, () -> {
+      // cast to Class to remove generics:
+      publicTestMethod.getImplementationDistance((Class) LuceneTestCase.class);
+    });
+    
+    // Method bogus() does not exist, so IAE should be thrown
+    expectThrows(IllegalArgumentException.class, () -> {
+      new VirtualMethod<>(TestVirtualMethod.class, "bogus");
+    });
+    
+    // Method publicTest(String) is not declared in TestClass2, so IAE should be thrown
+    expectThrows(IllegalArgumentException.class, () -> {
+      new VirtualMethod<>(TestClass2.class, "publicTest", String.class);
+    });
+
+    // try to create a second instance of the same baseClass / method combination
+    expectThrows(UnsupportedOperationException.class, () -> {
+      new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
+    });
+  }
+  
+}


[lucene-solr] 02/02: SOLR-13452: Add comment on why kerby-pkix is excluded.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch jira/SOLR-13452_gradle_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit a07998374d536c49e5e533ae48bfba206067ab42
Author: markrmiller <ma...@apache.org>
AuthorDate: Thu Jun 13 09:32:08 2019 -0500

    SOLR-13452: Add comment on why kerby-pkix is excluded.
---
 solr/core/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/core/build.gradle b/solr/core/build.gradle
index c6843e5..0cce7f8 100644
--- a/solr/core/build.gradle
+++ b/solr/core/build.gradle
@@ -211,7 +211,7 @@ missingDeps {
 }
 
 unusedDeps {
-  jarExclude 'kerby-pkix-.*?\\.jar'
+  jarExclude 'kerby-pkix-.*?\\.jar' // used by security components dynamically
 }
 
 task runJavacc(type: org.apache.lucene.gradle.JavaCC) {