RFR: 8314070: javax.print: Support IPP output-bin attribute extension [v7]
Alexander Scherbatiy
alexsch at openjdk.org
Sat May 11 13:11:04 UTC 2024
On Mon, 6 May 2024 18:06:18 GMT, Alexander Scherbatiy <alexsch at openjdk.org> wrote:
>> Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Change 'Page Setup' to 'Appearance' tab in the OutputBinAttributePrintDialogTest
>
> I added the `OutputBin` class and package-info.java changes to the CSR `javax.print: Support IPP output-bin attribute extension` description: https://bugs.openjdk.org/browse/JDK-8331601
>
> The `OutputBin` class has two `myStringTable` and `myEnumValueTable` tables. They are private but their values are accessed through the public API. Should `myStringTable` and `myEnumValueTable` tables be mentioned in the CSR?
>
> Should the changes in the common print dialog (the output bin label and the output bin combo-box) and new properties from the `serviceui.properties` be described in the CSR?
> @AlexanderScherbatiy did you see the comment in the CSR about sealed classes ?
> I had originally suggested in this PR (search for a comment from a while ago) and I don't know if you saw it there either.
@prrace
There are two things which are not clear for me.
The first one is that a user can extend `OutputBin` class and provide its own implementation.
Should it be possible to the user provide output bins other than supported ones?
The another question relates to `CustomOutputBin` class which is used to provide a list of supported output bins and which is not public.
To make `OutputBin` class sealed it needs to add `CustomOutputBin` class to `OutputBin` class permits list:
public sealed class OutputBin extends EnumSyntax implements PrintRequestAttribute, PrintJobAttribute
permits sun.print.CustomOutputBin {
}
public final class CustomOutputBin extends OutputBin {
}
Is it good to use a non public class in the public class permits list?
I made docs for the jdk with sealed `OutputBin` class.
It has the `sealed` keyword in the javadoc but mentions nothing about internal `CustomOutputBin` class.
`images/docs/api/java.desktop/javax/print/attribute/standard/OutputBin.html`:
public sealed class OutputBin
extends EnumSyntax
implements PrintRequestAttribute, PrintJobAttribute
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16166#issuecomment-2105740617
More information about the client-libs-dev
mailing list