ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/jasper/compiler/TestNode.java

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

      
    
Rootfs path

      
    
Size
2450 (2.4 KB)
MD5
ea43d48d2c2557ac9bd8be9a8cb8ac59
SHA1
1f46e0b4b09a65b35ba267a0359e254801df6cc4
SHA256
d01e2e2cafb85b84880f63a69fe9b84daabd3ca4efeafb5e44663c53586a92c4
SHA512

      
    
SHA1_git
e27104d5392af2625385797f8e2fb8f4297ce238
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TestNode.java | 2.4 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.jasper.compiler; import java.util.List; import org.junit.Assert; import org.junit.Test; import org.apache.jasper.compiler.Node.PageDirective; public class TestNode { /* * https://bz.apache.org/bugzilla/show_bug.cgi?id=57099 */ @Test(expected = IllegalArgumentException.class) public void testPageDirectiveImport01() { doTestPageDirectiveImport("java.io.*; import java.net.*"); } @Test public void testPageDirectiveImport02() { doTestPageDirectiveImport("a,b,c"); } @Test public void testPageDirectiveImport03() { doTestPageDirectiveImport(" a , b , c "); } @Test public void testPageDirectiveImport04() { doTestPageDirectiveImport(" a , b , c "); } @Test public void testPageDirectiveImport05() { doTestPageDirectiveImport("java.util.List,java.util.ArrayList,java.util.Set"); } @Test(expected = IllegalArgumentException.class) public void testPageDirectiveImport06() { doTestPageDirectiveImport("java.util.List;import java.util.ArrayList; import java.util.Set"); } @Test public void testPageDirectiveImport07() { doTestPageDirectiveImport("java . util.List,java.util.ArrayList,java.util.Set"); } private void doTestPageDirectiveImport(String importDirective) { PageDirective pd = new PageDirective(null, null, null); pd.addImport(importDirective); List<String> imports = pd.getImports(); Assert.assertEquals(3, imports.size()); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
45.95
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
https://bz.apache.org/bugzilla/show_bug.cgi?id=57099 29 29