Skip to content

Conversation

@rajamah
Copy link
Member

@rajamah rajamah commented Aug 13, 2021

Removed try catch block so the test can function as expected and fail
when it ought to, rather than passing all the time because of catch
block catching all exceptions and Passing test even there is a failure.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8272342: [TEST_BUG] java/awt/print/PrinterJob/PageDialogMarginTest.java catches all exceptions

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5115/head:pull/5115
$ git checkout pull/5115

Update a local copy of the PR:
$ git checkout pull/5115
$ git pull https://git.openjdk.java.net/jdk pull/5115/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5115

View PR using the GUI difftool:
$ git pr show -t 5115

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5115.diff

…va catches all exceptions

Removed try catch block so the test can function as expected and fail
when it ought to, rather than passing all the time because of catch
block catching all exceptions and Passing test even there is a failure.
@bridgekeeper
Copy link

bridgekeeper bot commented Aug 13, 2021

👋 Welcome back rajamah! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 13, 2021
@openjdk
Copy link

openjdk bot commented Aug 13, 2021

@rajamah The following label will be automatically applied to this pull request:

  • awt

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the awt client-libs-dev@openjdk.org label Aug 13, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 13, 2021

Webrevs

Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add

    Locale.setDefault(Locale.US);

as the first line in main(), otherwise the Page Format dialog uses millimetres instead of inches for non-US locales.

Please resolve IDE warnings:

  1. Use Java style array declaration in main: String[] args.
  2. Line 51: Casting 'null' to 'Component' is redundant.
  3. Line 50: Statement lambda can be replaced with expression lambda.

Please update the copyright year.

Comment on lines 57 to 58
PageFormat pf;
pf = pj.pageDialog(aset);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest merging these two lines:

Suggested change
PageFormat pf;
pf = pj.pageDialog(aset);
PageFormat pf = pj.pageDialog(aset);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes you asked.

@openjdk
Copy link

openjdk bot commented Aug 14, 2021

⚠️ @rajamah the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout 8272342
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Aug 14, 2021

@rajamah This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8272342: [TEST_BUG] java/awt/print/PrinterJob/PageDialogMarginTest.java catches all exceptions

Reviewed-by: aivanov, pbansal

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 17 new commits pushed to the master branch:

  • ae45592: 8272374: doclint should report missing "body" comments
  • b2c272d: 8272305: several hotspot runtime/modules don't check exit codes
  • 8268825: 8272297: FileInputStream should override transferTo() for better performance
  • 3677734: 8271471: [IR Framework] Rare occurrence of "" in PrintIdeal/PrintOptoAssembly can let tests fail
  • 0a03481: 8272231: G1: Refactor G1CardSet::get_card_set to return G1CardSetHashTableValue*
  • 83d0e12: 8267833: Improve G1CardSetInlinePtr::add()
  • 69cc588: 8272235: G1: update outdated code root fixup
  • 5db36ce: 8272158: SoftReference related bugs under memory pressure
  • 7a5b37b: 8272439: G1: add documentation to G1CardSetInlinePtr
  • 0209d9f: 8272461: G1: remove empty declaration of cleanup_after_scan_heap_roots
  • ... and 7 more: https://git.openjdk.java.net/jdk/compare/bd7f9b4fb9a037b8efd9d552149efd41ce7f7155...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@aivanov-jdk, @pankaj-bansal) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 14, 2021
Comment on lines 36 to 40
import javax.print.attribute.standard.DialogTypeSelection;
import javax.print.attribute.standard.MediaPrintableArea;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import java.text.MessageFormat;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder where do DialogTypeSelection and MessageFormat come from?

The imports should be sorted by default, usually your IDE handles it perfectly on its own.

rajamah and others added 2 commits August 16, 2021 12:35
Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk@users.noreply.github.com>
@rajamah
Copy link
Member Author

rajamah commented Aug 16, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 16, 2021
@openjdk
Copy link

openjdk bot commented Aug 16, 2021

@rajamah
Your change (at version 48dce3b) is now ready to be sponsored by a Committer.

@aivanov-jdk
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 16, 2021

Going to push as commit a5ad772.
Since your change was applied there have been 17 commits pushed to the master branch:

  • ae45592: 8272374: doclint should report missing "body" comments
  • b2c272d: 8272305: several hotspot runtime/modules don't check exit codes
  • 8268825: 8272297: FileInputStream should override transferTo() for better performance
  • 3677734: 8271471: [IR Framework] Rare occurrence of "" in PrintIdeal/PrintOptoAssembly can let tests fail
  • 0a03481: 8272231: G1: Refactor G1CardSet::get_card_set to return G1CardSetHashTableValue*
  • 83d0e12: 8267833: Improve G1CardSetInlinePtr::add()
  • 69cc588: 8272235: G1: update outdated code root fixup
  • 5db36ce: 8272158: SoftReference related bugs under memory pressure
  • 7a5b37b: 8272439: G1: add documentation to G1CardSetInlinePtr
  • 0209d9f: 8272461: G1: remove empty declaration of cleanup_after_scan_heap_roots
  • ... and 7 more: https://git.openjdk.java.net/jdk/compare/bd7f9b4fb9a037b8efd9d552149efd41ce7f7155...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 16, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Aug 16, 2021
@openjdk
Copy link

openjdk bot commented Aug 16, 2021

@aivanov-jdk @rajamah Pushed as commit a5ad772.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awt client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants