You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2015/08/05 17:20:15 UTC

svn commit: r1694247 - in /lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security: MockAuthenticationPlugin.java MockAuthorizationPlugin.java PKIAuthenticationIntegrationTest.java Predicate.java

Author: noble
Date: Wed Aug  5 15:20:14 2015
New Revision: 1694247

URL: http://svn.apache.org/r1694247
Log:
SOLR-7849: Predicate is not available in java 7

Added:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/Predicate.java   (with props)
Modified:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthenticationPlugin.java
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthorizationPlugin.java
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthenticationPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthenticationPlugin.java?rev=1694247&r1=1694246&r2=1694247&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthenticationPlugin.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthenticationPlugin.java Wed Aug  5 15:20:14 2015
@@ -25,7 +25,6 @@ import javax.servlet.ServletResponse;
 import java.io.IOException;
 import java.security.Principal;
 import java.util.Map;
-import java.util.function.Predicate;
 
 public class MockAuthenticationPlugin extends AuthenticationPlugin {
   static Predicate<ServletRequest> predicate;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthorizationPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthorizationPlugin.java?rev=1694247&r1=1694246&r2=1694247&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthorizationPlugin.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/MockAuthorizationPlugin.java Wed Aug  5 15:20:14 2015
@@ -20,7 +20,6 @@ package org.apache.solr.security;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.function.Predicate;
 
 import org.apache.solr.common.SolrException;
 import org.slf4j.Logger;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java?rev=1694247&r1=1694246&r2=1694247&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java Wed Aug  5 15:20:14 2015
@@ -22,7 +22,6 @@ import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import java.security.Principal;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.Predicate;
 
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.request.QueryRequest;

Added: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/Predicate.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/Predicate.java?rev=1694247&view=auto
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/Predicate.java (added)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/Predicate.java Wed Aug  5 15:20:14 2015
@@ -0,0 +1,26 @@
+package org.apache.solr.security;
+
+/*
+ * 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.
+ */
+
+/**For making the code work in Java 7.
+ * In trunk it uses the Predicate interface in jdk
+ */
+public interface Predicate<T> {
+
+  boolean test(T t);
+}