ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/storeconfig/LoaderSF.java

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

      
    
Rootfs path

      
    
Size
2630 (2.6 KB)
MD5
34b968a702fc3411feceef3d2b75b592
SHA1
967d95620b4f90cdfcc084e10093b4c691ed32d0
SHA256
215450c2450b8c173c9a43329199ff02451f3303d8dc4ba8a29d32b9b1ccbb75
SHA512

      
    
SHA1_git
73831cd056f9a82c0ef4f1890cbc0b8463e478b6
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
LoaderSF.java | 2.6 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.storeconfig; import java.io.PrintWriter; import org.apache.catalina.Loader; import org.apache.catalina.loader.WebappLoader; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; /** * Store Loader Element. */ public class LoaderSF extends StoreFactoryBase { private static final Log log = LogFactory.getLog(LoaderSF.class); @Override public void store(PrintWriter aWriter, int indent, Object aElement) throws Exception { StoreDescription elementDesc = getRegistry().findDescription(aElement.getClass()); if (elementDesc != null) { Loader loader = (Loader) aElement; if (!isDefaultLoader(loader)) { if (log.isTraceEnabled()) { log.trace("store " + elementDesc.getTag() + "( " + aElement + " )"); } getStoreAppender().printIndent(aWriter, indent + 2); getStoreAppender().printTag(aWriter, indent + 2, loader, elementDesc); } } else { if (log.isWarnEnabled()) { log.warn(sm.getString("factory.storeNoDescriptor", aElement.getClass())); } } } /** * Is this an instance of the default <code>Loader</code> configuration, with all-default properties? * * @param loader Loader to be tested * * @return <code>true</code> if this is an instance of the default loader */ protected boolean isDefaultLoader(Loader loader) { if (!(loader instanceof WebappLoader wloader)) { return false; } return (!wloader.getDelegate()) && wloader.getLoaderClass().equals("org.apache.catalina.loader.WebappClassLoader"); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
41.9
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