ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/jakarta/servlet/jsp/el/NotFoundELResolver.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/jakarta/servlet/jsp/el/NotFoundELResolver.java
Status
scanned
Type
file
Name
NotFoundELResolver.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
4170 (4.1 KB)
MD5
54edd1ba8f489af91945c37bbb9d0426
SHA1
d62186d29dbc77285d55f426c806641c547e3359
SHA256
dba6f91c8c5a93cf92f48cf2cc1408d39fd9c893763435ea89a88c7159e64c2a
SHA512

      
    
SHA1_git
30a7a5135be116822ef1ac2a020b72657a2af46e
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
NotFoundELResolver.java | 4.1 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 jakarta.servlet.jsp.el; import java.util.Objects; import java.util.ResourceBundle; import jakarta.el.ELContext; import jakarta.el.ELResolver; import jakarta.el.PropertyNotFoundException; /** * The final resolver of the Jakarta Pages ELResolver chain. It always resolves the requested value, returning * {@code null} when it does so. * * @since JSP 3.1 */ public class NotFoundELResolver extends ELResolver { private static final String LSTRING_FILE = "jakarta.servlet.jsp.LocalStrings"; private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE); /** * Default constructor. */ public NotFoundELResolver() { super(); } /** * {@inheritDoc} * <p> * Resolves the property and always returns {@code null} unless the provided context contains a Boolean object with * value {@code Boolean.TRUE} as the value associated with the key * {@code jakarta.servlet.jsp.el.NotFoundELResolver.class} in which case an exception is thrown. This is to support * implementation of the {@code errorOnELNotFound} page/tag directive. * * @return Always {@code null} * * @throws PropertyNotFoundException if the provided context contains a Boolean object with value * {@code Boolean.TRUE} as the value associated with the key * {@code jakarta.servlet.jsp.el.NotFoundELResolver.class} */ @Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); Object obj = context.getContext(this.getClass()); if (obj instanceof Boolean && ((Boolean) obj).booleanValue()) { throw new PropertyNotFoundException( lStrings.getString("el.unknown.identifier") + " [" + property.toString() + "]"); } context.setPropertyResolved(base, property); return null; } /** * {@inheritDoc} * <p> * In normal usage, {@link ScopedAttributeELResolver} will have responded. * * @return Always {@code null} */ @Override public Class<Object> getType(ELContext context, Object base, Object property) { Objects.requireNonNull(context); return null; } /** * {@inheritDoc} * <p> * No-op. In normal usage, {@link ScopedAttributeELResolver} will have responded. */ @Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); } /** * {@inheritDoc} * <p> * In normal usage, {@link ScopedAttributeELResolver} will have responded. * * @return Always {@code false} */ @Override public boolean isReadOnly(ELContext context, Object base, Object property) { Objects.requireNonNull(context); return false; } /** * {@inheritDoc} * <p> * In normal usage, {@link ScopedAttributeELResolver} will have responded. * * @return Always {@code null} */ @Override public Class<String> getCommonPropertyType(ELContext context, Object base) { return null; } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
27.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