Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215112

String::transform spec clarification

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b22
    • Introduced In Version:
      12
    • Resolved In Build:
      b28

      Backports

        Description

        String::transform spec doesn't mention - what happens if function throws an exception?

        E.g.

        Function<String, String> function = str -> {throw new RuntimeException();};
        "abc".transform(function);

        This code throws RunTimeException when executed.
        However String::transform spec has no mention that it can throw possible exception(s) thrown by function

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jlaskey Jim Laskey
                Reporter:
                dsingh Durgesh Singh (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: