Skip to content

Conversation

@stevearmstrong-dev
Copy link

Summary

  • Adds @throws ArrayStoreException documentation to concat(T, T[]) and concat(T[], T) methods
  • Adds test cases demonstrating when ArrayStoreException occurs
  • Updates both JRE and Android versions for consistency

Motivation

Addresses issue #3768 - these methods can throw ArrayStoreException at runtime when incompatible types are passed, but this behavior was not documented in the Javadoc.

Changes

  • Documentation: Added @throws tags explaining when ArrayStoreException occurs
  • Tests: Added testPrependIncompatibleType_throwsArrayStoreException() and testAppendIncompatibleType_throwsArrayStoreException() to verify and document the behavior
  • Scope: Updated all 4 files (JRE + Android source and tests)

Related Issue

Closes #3768

Add @throws ArrayStoreException documentation to concat(T, T[]) and
concat(T[], T) methods to clarify when this exception can occur at runtime.

Also add test cases that demonstrate and document this behavior.

Addresses issue google#3768
@netdpb netdpb requested a review from cpovirk November 24, 2025 13:55
@netdpb netdpb added type=api-docs Change/add API documentation P3 no SLO package=collect labels Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 no SLO package=collect type=api-docs Change/add API documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ObjectArrays.concat(T[], T) and (T, T[]) can throw ArrayStoreException

2 participants