Nuxeo Core Developer Guide

Field, Variable and Parameter Value Enforcement

Updated: March 18, 2024

Assertions on variables and parameters

This page is a work in progress: it will address the recommended solution to check for field, variable and parameter values. How to express and check that some can or cannot be null; how to mark security sensitive parameters; ...

Programming With Assertions (aka assert statements)

See http://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html

There are many situations where it is good to use assertions, including:

There are also situations where you should not use them:

  • Do not use assertions for argument checking in public methods.
  • Do not use assertions to do any work that your application requires for correct operation.