ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/org/junit/internal/Checks.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/org/junit/internal/Checks.java
Status
scanned
Type
file
Name
Checks.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
1093 (1.1 KB)
MD5
e0a95f6145cc1426dba64f174a4f86c5
SHA1
0f9d78be7446337bfd7dcd8810594c70abdb99ab
SHA256
1a183faae1ae87d03b7f0e25fa729fd61c8e673a6280cd4ca3f6e6643ea18487
SHA512

      
    
SHA1_git
9724947f99779981f2122e7dd58ca2902010e03b
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
Checks.java | 1.1 KB |

package org.junit.internal; /** @since 4.13 */ public final class Checks { private Checks() {} /** * Checks that the given value is not {@code null}. * * @param value object reference to check * @return the passed-in value, if not {@code null} * @throws NullPointerException if {@code value} is {@code null} */ public static <T> T notNull(T value) { if (value == null) { throw new NullPointerException(); } return value; } /** * Checks that the given value is not {@code null}, using the given message * as the exception message if an exception is thrown. * * @param value object reference to check * @param message message to use if {@code value} is {@code null} * @return the passed-in value, if not {@code null} * @throws NullPointerException if {@code value} is {@code null} */ public static <T> T notNull(T value, String message) { if (value == null) { throw new NullPointerException(message); } return value; } }