ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/tomcat/util/scan/TestJarScanner.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/tomcat/util/scan/TestJarScanner.java
Status
scanned
Type
file
Name
TestJarScanner.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
1911 (1.9 KB)
MD5
c56abc097eefa84efc1631a77ddb3e01
SHA1
d413fe40eee505934caf8198d0fcb9b3a3a834f5
SHA256
54a8661a15419513648a0b7871d7faf2fa08d5a49becacc415cb513bd1cec714
SHA512

      
    
SHA1_git
c1175064f7a17dd95b9f9db6facab1daa0566ac3
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TestJarScanner.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.tomcat.util.scan; import java.util.StringTokenizer; import org.junit.Assert; import org.junit.Test; import org.apache.catalina.startup.TomcatBaseTest; public class TestJarScanner extends TomcatBaseTest { @Test public void testJarsToSkipFormat() { String jarList = System.getProperty(Constants.SKIP_JARS_PROPERTY); Assert.assertNotNull("Jar skip list is null", jarList); Assert.assertFalse("Jar skip list is empty", jarList.isEmpty()); StringTokenizer tokenizer = new StringTokenizer(jarList, ","); String token; while (tokenizer.hasMoreElements()) { token = tokenizer.nextToken(); Assert.assertTrue("Token \"" + token + "\" does not end with \".jar\"", token.endsWith(".jar")); Assert.assertEquals("Token \"" + token + "\" contains sub string \".jar\"" + " or separator \",\" is missing", token.length() - ".jar".length(), token.indexOf(".jar")); } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
54.09
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