ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/tribes/TesterUtil.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/tribes/TesterUtil.java
Status
scanned
Type
file
Name
TesterUtil.java
Extension
.java
Programming language
Java
Mime type
text/x-c
File type
C source, ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
1959 (1.9 KB)
MD5
5320ebd7b6fa54d970be3b013ad8dfe9
SHA1
f4d3639b30b8d686c11df4bf9b5598ee8d123f0b
SHA256
d857bbc61af059101e040ca4e0565d0db6b61ff024b212ae130a9abc3b9fdd6b
SHA512

      
    
SHA1_git
dc921920700e9c2a9f757374276684bc3e7b90da
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TesterUtil.java | 1.9 KB |

/* * 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. */ package org.apache.catalina.tribes; import org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor; import org.apache.catalina.tribes.util.UUIDGenerator; /** * Utility methods for use by multiple tests. */ public class TesterUtil { private TesterUtil() { // Hide default constructor } /* * Configures a set of channels to use a random domain. Use to ensure that * multiple instance of the test suite do not interfere when running on the * same machine. This may happen in a CI system or when a developer is * running tests for multiple branches in parallel. */ public static void addRandomDomain(ManagedChannel[] channels) { if (channels == null) { return; } byte[] domain = UUIDGenerator.randomUUID(false); for (ManagedChannel channel : channels) { channel.getMembershipService().setDomain(domain); DomainFilterInterceptor filter = new DomainFilterInterceptor(); filter.setDomain(domain); channel.addInterceptor(filter); } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
51.74
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9