> 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.
> 
> The commits help break up the changes.
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Nir Lisker has updated the pull request incrementally with three additional 
commits since the last revision:

 - Update 
modules/javafx.base/src/main/java/javafx/util/converter/TimeStringConverter.java
   
   Co-authored-by: Kevin Rushforth <[email protected]>
 - Update 
modules/javafx.base/src/main/java/javafx/util/converter/DateTimeStringConverter.java
   
   Co-authored-by: Kevin Rushforth <[email protected]>
 - Update 
modules/javafx.base/src/main/java/javafx/util/converter/DateStringConverter.java
   
   Co-authored-by: Kevin Rushforth <[email protected]>

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/2361/files
  - new: https://git.openjdk.org/jfx/pull/2361/files/0c743803..b8049779

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=2361&range=01
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=2361&range=00-01

  Stats: 6 lines in 3 files changed: 0 ins; 3 del; 3 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