Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8269269: [macos11] SystemIconTest fails with ClassCastException #4776

Closed
wants to merge 1 commit into from

Conversation

@azuev-java
Copy link
Member

@azuev-java azuev-java commented Jul 14, 2021

Do not test situation where UIResource icon is returned
Added a whole bunch of debug information to see what file test is filed
upon.


Progress

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

Issue

  • JDK-8269269: [macos11] SystemIconTest fails with ClassCastException

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4776

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

Using diff file

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

Do not test situation where UIResource icon is returned
Added a whole bunch of debug information to see what file test is filed
upon.
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 14, 2021

👋 Welcome back kizune! 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.

Loading

@openjdk openjdk bot added the rfr label Jul 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 14, 2021

@azuev-java The following label will be automatically applied to this pull request:

  • swing

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.

Loading

@openjdk openjdk bot added the swing label Jul 14, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jul 14, 2021

Webrevs

Loading

@jayathirthrao
Copy link
Member

@jayathirthrao jayathirthrao commented Jul 15, 2021

This issue is not specific to macOS 11, it is reproducible in my 10.15.7 also.
Test fails with ClassCastException before fix and passes after fix.

Loading

if (!(i instanceof ImageIcon)) {
// Default UI resource icon returned - it is not covered
// by new implementation so we can not test it
continue;
Copy link
Member

@jayathirthrao jayathirthrao Jul 15, 2021

Choose a reason for hiding this comment

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

I see that we are hitting this condition for all sizes on my 10.15.7 mac. Basically making testSystemIcon() to not run in my Mac. Do we have any other use case where we dont hit this condition in Mac or non-Windows platform?

Loading

Copy link
Member Author

@azuev-java azuev-java Jul 15, 2021

Choose a reason for hiding this comment

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

I tested on Ubuntu - it does not hit that condition. In future, when similar functionality with multiresolution icons might be implemented on Mac we might pass the test on Mac in similar way but right now it is implemented using the UIResourceIcon and that is - while being within spec - makes test to fail.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Jul 15, 2021

@azuev-java 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:

8269269: [macos11] SystemIconTest fails with ClassCastException

Reviewed-by: jdv

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 48 new commits pushed to the master branch:

  • 99d7f9a: 8264908: Investigate adding BOT range check in G1BlockOffsetTablePart::block_at_or_preceding
  • e92e2fd: 8270517: Add Zero support for LoongArch
  • 7a89ffe: 8270014: Add scoped objects for g1 young gc verification and young gc internal timing
  • 793d772: 8270475: Remove unused G1STWDrainQueueClosure
  • 1ebd946: 8270333: -XX:+VerifyStringTableAtExit should not do linear search
  • 04b73bc: 8269656: The test test/langtools/tools/javac/versions/Versions.java has duplicate test cycles
  • 7c23491: 8269598: Regressions up to 5% on aarch64 seems due to JDK-8268858
  • 7d0edb5: Merge
  • 7b4d84c: 8270422: Test build/AbsPathsInImage.java fails after JDK-8259848
  • 72db09b: 8266313: (JEP-356) - RandomGenerator spec implementation requirements tightly coupled to JDK internal classes
  • ... and 38 more: https://git.openjdk.java.net/jdk/compare/a4e5f08fefac50a1ced7ff4178d9d76f90797949...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

Loading

@openjdk openjdk bot added the ready label Jul 15, 2021
@azuev-java
Copy link
Member Author

@azuev-java azuev-java commented Jul 16, 2021

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Jul 16, 2021

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

  • e35005d: 8268773: Improvements related to: Failed to start thread - pthread_create failed (EAGAIN)
  • ea77ef8: 8269725: AArch64: Add VectorMask query implementation for NEON
  • 7240d67: Merge
  • e104ded: 8268635: Corrupt oop in ClassLoaderData
  • a32d2ee: 8269276: Additional tests for MessageDigest with different providers
  • bb82005: 8270468: TestRangeCheckEliminated fails because methods are not compiled
  • 057992f: 8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers
  • 746fe5d: 8270366: C2: Add associative rule to add/sub node
  • 1f995e5: 8265888: StandardJavaFileManager::setLocationForModule specification misses 'Implementation Requirements:'
  • c962e6e: 8261006: 'super' qualified method references cannot occur in a static context
  • ... and 48 more: https://git.openjdk.java.net/jdk/compare/a4e5f08fefac50a1ced7ff4178d9d76f90797949...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk openjdk bot closed this Jul 16, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jul 16, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 16, 2021

@azuev-java Pushed as commit eab959c.

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

Loading

@NikolayTach
Copy link

@NikolayTach NikolayTach commented Jul 16, 2021

Documents that changes to the specification made between Java SE 15 and Java SE 16. This document includes descriptions of those new features and enhancements that are also changes to the specification. The descriptions also identify potential compatibility issues that you might encounter when migrating to JDK 16.

Loading

@NikolayTach
Copy link

@NikolayTach NikolayTach commented Jul 16, 2021

@azuev-java
A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods. When the BufferedInputStream is created, an internal buffer array is created. As bytes from the stream are read or skipped, the internal buffer is refilled as necessary from the contained input stream, many bytes at a time.The mark operation remembers a point in the input stream and the reset operation causes all the bytes read since the most recent mark operation to be reread before new bytes are taken from the contained input stream. JUnit (3.0) test cases within test source folder.

Loading

@mrserb
Copy link
Member

@mrserb mrserb commented Jul 22, 2021

@azuev-java I thought we agreed to fix the product bug mentioned here? openjdk/jdk17#178 (comment) Why the test was changed only?

Loading

@azuev-java
Copy link
Member Author

@azuev-java azuev-java commented Jul 22, 2021

@azuev-java I thought we agreed to fix the product bug mentioned here? openjdk/jdk17#178 (comment) Why the test was changed only?

Yeah, and i did it here: #4777 The original PR covered two bugs at once to save time before we went into RDP2 but since we decided not to try it i split review into two separate ones.

Loading

@mrserb
Copy link
Member

@mrserb mrserb commented Aug 4, 2021

Thank you!

Loading

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