ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/el/lang/VariableMapperImpl.java

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

      
    
Rootfs path

      
    
Size
2152 (2.1 KB)
MD5
f3f97b566b15581f4319d774ab461d2a
SHA1
0962d0c4b558b16fbf75c10d7ff509ec0baf2c1c
SHA256
cdfd6c4ccfb1434802a31c9fc07e0a91aedb3ece439acd9dd9999b886c73859d
SHA512

      
    
SHA1_git
46d36f8581808d04a65a2aca0e9588dbe7284b82
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
VariableMapperImpl.java | 2.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 org.apache.el.lang; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.io.Serial; import java.util.HashMap; import java.util.Map; import jakarta.el.ValueExpression; import jakarta.el.VariableMapper; public class VariableMapperImpl extends VariableMapper implements Externalizable { @Serial private static final long serialVersionUID = 1L; private Map<String,ValueExpression> vars = new HashMap<>(); public VariableMapperImpl() { super(); } @Override public ValueExpression resolveVariable(String variable) { return this.vars.get(variable); } @Override public ValueExpression setVariable(String variable, ValueExpression expression) { if (expression == null) { return vars.remove(variable); } else { return vars.put(variable, expression); } } @SuppressWarnings("unchecked") @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.vars = (Map<String,ValueExpression>) in.readObject(); } @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(this.vars); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
48.57
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