You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2018/02/12 16:27:21 UTC
lucene-solr:branch_7x: SOLR-10338: Remove test class / command line
program that was only used during development
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 53344ac28 -> cda002d9e
SOLR-10338: Remove test class / command line program that was only used during development
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/cda002d9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cda002d9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cda002d9
Branch: refs/heads/branch_7x
Commit: cda002d9e3ea3ce1da0669065be11ef2c1889a32
Parents: 53344ac
Author: Uwe Schindler <us...@apache.org>
Authored: Mon Feb 12 17:26:06 2018 +0100
Committer: Uwe Schindler <us...@apache.org>
Committed: Mon Feb 12 17:27:07 2018 +0100
----------------------------------------------------------------------
.../test/SecureRandomAlgorithmTesterApp.java | 41 --------------------
1 file changed, 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cda002d9/solr/core/src/test/SecureRandomAlgorithmTesterApp.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/SecureRandomAlgorithmTesterApp.java b/solr/core/src/test/SecureRandomAlgorithmTesterApp.java
deleted file mode 100644
index 44f79e9..0000000
--- a/solr/core/src/test/SecureRandomAlgorithmTesterApp.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-public class SecureRandomAlgorithmTesterApp {
- public static void main(String[] args) throws NoSuchAlgorithmException {
- String algorithm = args[0];
- String method = args[1];
- int amount = Integer.valueOf(args[2]);
- SecureRandom secureRandom;
- if(algorithm.equals("default"))
- secureRandom = new SecureRandom();
- else
- secureRandom = SecureRandom.getInstance(algorithm);
- System.out.println("Algorithm:" + secureRandom.getAlgorithm());
- switch(method) {
- case "seed": secureRandom.generateSeed(amount); break;
- case "bytes": secureRandom.nextBytes(new byte[amount]); break;
- case "long": secureRandom.nextLong(); break;
- case "int": secureRandom.nextInt(); break;
- default: throw new IllegalArgumentException("Not supported random function: " + method);
- }
- System.out.println("SecureRandom function invoked");
- }
-}