ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/webresources/TesterWebResourceRoot.java

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

      
    
Rootfs path

      
    
Size
3915 (3.8 KB)
MD5
68634efe496ab9e149517fc75f1b6332
SHA1
870cffaac91f8334852690370c6071c8e4ec9da5
SHA256
4d02b1bcc931956a6918c4f9328050f415dd5058c686c14a1da894fc714b2ce4
SHA512

      
    
SHA1_git
24407b920a22ebb24bdfa35f22272297ad32473b
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TesterWebResourceRoot.java | 3.8 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.webresources; import java.net.URL; import org.apache.catalina.Context; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.LifecycleState; import org.apache.tomcat.unittest.TesterContext; /** * Minimal implementation for use in unit tests that supports main and pre * resources. */ public class TesterWebResourceRoot extends StandardRoot { public TesterWebResourceRoot() { super(); setCachingAllowed(false); } @Override public void addLifecycleListener(LifecycleListener listener) { // NO-OP } @Override public LifecycleListener[] findLifecycleListeners() { return null; } @Override public void removeLifecycleListener(LifecycleListener listener) { // NO-OP } @Override public void initInternal() throws LifecycleException { // NO-OP } @Override public void startInternal() throws LifecycleException { setState(LifecycleState.STARTING); } @Override public void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); } @Override public void destroyInternal() throws LifecycleException { // NO-OP } @Override public LifecycleState getState() { return LifecycleState.STARTED; } @Override public String getStateName() { return null; } Context context = new TesterContext(); @Override public Context getContext() { return context; } @Override public void setContext(Context context) { // NO-OP } @Override public void createWebResourceSet(ResourceSetType type, String webAppPath, URL url, String internalPath) { // NO-OP } @Override public void createWebResourceSet(ResourceSetType type, String webAppPath, String base, String archivePath, String internalPath) { // NO-OP } @Override public void setAllowLinking(boolean allowLinking) { // NO-OP } @Override public boolean getAllowLinking() { return false; } @Override public void setCachingAllowed(boolean cachingAllowed) { // NO-OP } @Override public boolean isCachingAllowed() { return false; } @Override public void setCacheTtl(long ttl) { // NO-OP } @Override public long getCacheTtl() { return 0; } @Override public void setCacheMaxSize(long cacheMaxSize) { // NO-OP } @Override public long getCacheMaxSize() { return 0; } @Override public void setCacheObjectMaxSize(int cacheObjectMaxSize) { // NO-OP } @Override public int getCacheObjectMaxSize() { return 0; } @Override public void backgroundProcess() { // NO-OP } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
32.34
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