RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue
Alexey Ivanov
aivanov at openjdk.java.net
Mon Dec 6 16:26:10 UTC 2021
On Thu, 25 Nov 2021 09:54:47 GMT, Tejesh R <duke at openjdk.java.net> wrote:
> MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation.
Please also update the copyright year at the start of the file.
src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java line 103:
> 101: * MaskFormatter formatter = new MaskFormatter("###-####");
> 102: * formatter.setPlaceholderCharacter('_');
> 103: * formatter.getDisplayValue(tf, "123");
This code is part of an example, without this line, the following lines of documentation do not make sense. Probably, `getDisplayValue` should be replaced with `valueToString`. You should check that and ensure the sample and the expected output, as discussed in the following sentences, is correct.
-------------
Changes requested by aivanov (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6556
More information about the client-libs-dev
mailing list