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

String::transform spec clarification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 12
    • core-libs
    • b22
    • 12
    • b28

        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

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

                Created:
                Updated:
                Resolved: