Follow-up to #1880. Adds deprecation warnings, `@throws` tags, and leftover 
fixes.

The rethrowing we have on parsing methods is inconsistent. The 
`BaseTemporalStringConverter`s don't rethrow and instead the exception is 
naturally propagated. `DateTimeStringConverter`s and `NumberStringConverter`s 
rethrow parsing exceptions as IAE. `FormatStringConverter` throws an IAE on 
partial parsing, but not on a failed parsing (that doesn't throw naturally 
either).

I think that rethrowing parsing exceptions as IAE isn't helpful. The original 
exception will propagate up the stack and be clear to the developer at least as 
well as the rethrown IAE in my opinion. The only case where I would throw is in 
the `FormatStringConverter` where an exception isn't thrown and `null` is 
returned instead. Throwing on a partial parse is debatable.


---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - Add missing method for backwards compatibility
 - Add @throws documentation
 - Correct methods modifiers
 - Add deprecations version
 - Deprecate Format converter method
 - Use consistent formatting
 - Deprecate Date converters

Changes: https://git.openjdk.org/jfx/pull/2361/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2361&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8396900
  Stats: 47 lines in 6 files changed: 28 ins; 10 del; 9 mod
  Patch: https://git.openjdk.org/jfx/pull/2361.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2361/head:pull/2361

PR: https://git.openjdk.org/jfx/pull/2361

Reply via email to