Annotation Interface XStreamDeserializable


@Documented @Retention(RUNTIME) @Target(FIELD) public @interface XStreamDeserializable
Explicitly marks a transient field as participating in XStream deserialization.

This annotation is currently a no-op: RobustReflectionConverter already unmarshals into all transient fields by default (to support data migration from old on-disk formats via, e.g., readResolve()). However, a future version of Jenkins is expected to invert this default so that transient fields are skipped during deserialization unless explicitly opted in.

Apply this annotation to transient fields that legitimately need to be populated from on-disk XML during deserialization — typically fields that were once non-transient and are now read by, e.g., readResolve() to migrate data to a newer representation.

Annotating migration fields now prepares the codebase (and plugins) for the planned default change without requiring a coordinated mass migration at that time.

Like XStreamNotDeserializable, it is expected that Jenkins will identify presence of this annotation by simple class name. So plugins can use it without needing a Jenkins core dependency that includes this annotation.

Since:
2.580
See Also: