Skip to content

Migrating from 0.6

Jin Kwon edited this page Nov 17, 2026 · 1 revision

Migrating from 0.6

0.7.0 renames types; no assertion behaves differently. Code that only chains from assertThat...(..) and extracting...(..) compiles unchanged, but must be recompiled: the return types changed.

0.6 0.7
DefaultBeanAssert, DefaultPathAssert, ... BeanAssert, PathAssert, ... — the Default prefix is gone, as in AssertJ
AbstractPathAssert.AbstractMethodNodeAssert (nested) AbstractMethodNodeAssert (top level), and likewise for every node kind
DefaultPathAssert.DefaultNodeAssert.DefaultMethodNodeAssert MethodNodeAssert
AbstractPathAssert.HasContainerClass, .HasTypeArgumentIndex, .HasParameterTypes, .HasParameterIndex (nested) top-level interfaces of the same names
AbstractNodeAssert<SELF> AbstractNodeAssert<SELF, ACTUAL extends Path.Node>; assertThatNode(..) returns AbstractNodeAssert<?, Path.Node>
extractingInvalidValue(), extractingExecutableReturnValue() returning Assert<?, Object>; extractingLeafBean() returning Assert<?, ?> all three return AbstractObjectAssert<?, Object>, so AssertJ's object vocabulary (extracting, usingRecursiveComparison, ...) applies

What to change:

  • Replace Default...Assert in SoftAssertions.proxy(..) calls and in your own subclasses.
  • Replace nested node-assertion imports with top-level ones from com.github.jinahya.assertj.validation.
  • Add the second type argument where you name AbstractNodeAssert yourself.

Clone this wiki locally