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

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

      
    
Rootfs path

      
    
Size
1610 (1.6 KB)
MD5
6dcf93bdffe3f5cfd7d5a96bb221ceb2
SHA1
a050a138653c62b5f3bd04c401cfebd2c2cf6849
SHA256
3641ea08d64dcd78954706e18c582474a43dcd3eb8f742b294e01b90c6a506eb
SHA512

      
    
SHA1_git
4a5a7b36e0fbbf28411752cfff75371fda57407b
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TestAstFloatingPoint.java | 1.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.el.parser; import java.math.BigDecimal; import jakarta.el.ELProcessor; import org.junit.Assert; import org.junit.Test; import org.apache.el.lang.ELSupport; public class TestAstFloatingPoint { @Test public void testValidDouble() { String value = "1.234e100"; ELProcessor processor = new ELProcessor(); Number result = processor.eval(value); Assert.assertTrue(ELSupport.equals(null, Double.valueOf(value), result)); } @Test public void testValidBigDecimal() { String value = "1.234e1000"; ELProcessor processor = new ELProcessor(); Number result = processor.eval(value); Assert.assertTrue(ELSupport.equals(null, new BigDecimal(value), result)); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
59.5
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