ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/el/parser/AstFloatingPoint.java

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

      
    
Rootfs path

      
    
Size
2192 (2.1 KB)
MD5
9e5eb56485aae02b2126d566de9626a3
SHA1
dc1516559ad19cdc29a6f83801c436651b3b1bcd
SHA256
942b8ec632eee7e6afbc32b91ddb1b3891896401ed3e501717a2c313290e0503
SHA512

      
    
SHA1_git
7bc566be4be1cedf38d8948c5f7ea24ea9c17166
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AstFloatingPoint.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. */ /* Generated By:JJTree: Do not edit this line. AstFloatingPoint.java */ package org.apache.el.parser; import java.math.BigDecimal; import jakarta.el.ELException; import org.apache.el.lang.EvaluationContext; public final class AstFloatingPoint extends SimpleNode { public AstFloatingPoint(int id) { super(id); } private volatile Number number; public Number getFloatingPoint() { // The parser should ensure the format of the string to be parsed. if (this.number == null) { try { Double d = Double.valueOf(this.image); if (d.isInfinite() || d.isNaN()) { this.number = new BigDecimal(this.image); } else { this.number = d; } } catch (NumberFormatException e) { // Catch NumberFormatException here just in case the parser // provides invalid input. throw new ELException(e); } } return this.number; } @Override public Object getValue(EvaluationContext ctx) throws ELException { return this.getFloatingPoint(); } @Override public Class<?> getType(EvaluationContext ctx) throws ELException { return this.getFloatingPoint().getClass(); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
48.18
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