Here you can find the source of assertFieldNotNull(Object fieldValue, String fieldName)
Parameter | Description |
---|---|
fieldValue | The object to check. |
fieldName | The name of the field. |
Parameter | Description |
---|---|
IllegalArgumentException | an exception |
public static void assertFieldNotNull(Object fieldValue, String fieldName) throws IllegalArgumentException
//package com.java2s; // * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * public class Main { /**// ww w . j a v a2 s . c o m * Throws an {@link IllegalArgumentException} if the specified field is <jk>null</jk>. * * @param fieldValue The object to check. * @param fieldName The name of the field. * @throws IllegalArgumentException */ public static void assertFieldNotNull(Object fieldValue, String fieldName) throws IllegalArgumentException { if (fieldValue == null) throw new IllegalArgumentException("Field '" + fieldName + "' cannot be null."); } }