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

[SUREFIRE-1882] Fix failures when compiled on Java 9+ and run on Java 8 #332

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

kriegaex
Copy link
Contributor

Cast to Buffer to avoid java.lang.NoSuchMethodError due to JDK API
breakage.

This was fixed in a similar way in apache/maven-wagon@92c0d2a.

See mongodb/mongo-java-driver@21c91bd for details.

Cast to Buffer to avoid java.lang.NoSuchMethodError due to JDK API
breakage.

This was fixed in a similar way in apache/maven-wagon@92c0d2a.

See mongodb/mongo-java-driver@21c91bd for details.
@kriegaex
Copy link
Contributor Author

kriegaex commented Jan 26, 2021

Looks like the "CI for Windows 1" failure was caused by a network problem:

Caused by: java.net.UnknownHostException: repo.maven.apache.org
    at java.net.Inet6AddressImpl.lookupAllHostAddr (Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr (InetAddress.java:929)
    at java.net.InetAddress.getAddressesFromNameService (InetAddress.java:1324)
    at java.net.InetAddress.getAllByName0 (InetAddress.java:1277)
    at java.net.InetAddress.getAllByName (InetAddress.java:1193)
    at java.net.InetAddress.getAllByName (InetAddress.java:1127)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.SystemDefaultDnsResolver.resolve (SystemDefaultDnsResolver.java:45)

The same build was successful on my local workstation a few minutes before the CI run.

@Tibor17
Copy link
Contributor

Tibor17 commented Jan 26, 2021

@kriegaex I did rerun of the build. The networ is bad sometimes.

@kriegaex
Copy link
Contributor Author

kriegaex commented Jan 26, 2021

Maybe you want to contribute instead of micro-managing my edits? 😉

image

Just add commits to this PR to your heart's content. I would not mind at all, considering myself your junior in this project anyway. I am an agile coach in my daytime job, not a professional software developer (I was 20 years ago). So I am all open for collaborative software development because this is what I am teaching to my coachee dev teams.

@kriegaex
Copy link
Contributor Author

Is the Travis CI build really still necessary?

@Tibor17
Copy link
Contributor

Tibor17 commented Jan 27, 2021

I talked about the Travis CI with our Infra team. They have migrated travis-ci.org to travis-ci.com. Let's leave the Travis alone for a while but it will come back in some form ;-)

@Tibor17
Copy link
Contributor

Tibor17 commented Jan 27, 2021

We can move on if the fix is complete.

@kriegaex
Copy link
Contributor Author

kriegaex commented Jan 27, 2021

Maybe you want to contribute instead of micro-managing my edits? 😉

After having checked all your code review suggestions plus all the other places I changed which you did not even mention, my assumption was confirmed that collaboratively working on this would have saved time. If you had just checked out the PR and tried to flip types in your IDE, you would have noticed. I think that code reviews outside of an IDE which actually compiles are not particularly helpful in this case where it is about changing types in order to avoid casting. So - no offence meant - this was a waste of time for both of us and I want to re-invite you to piggy-back on my PR and just commit whatever improvements you have for it. Before you could even write "could you edit this like that?", you would have done it already with no more time spent but without me spending time on checking, commenting back, you reading the comments again.

We could

  • avoid micro-management,
  • save time,
  • get better code faster,
  • avoid some of the 7 wastes of lean production, such as hand-offs, stretching the cycle time by scattering the touch times across a longer than necessary time frame, in turn requiring more context changes for both of us, trying to remember where we left off last time. You are a busy developer and doing OSS in your spare time, I assume. Even if someone pays you for it, you do not want to create waste.

Sorry for lobbying here and making this a general discussion, but I always do that when contributing to a project for the first time in order to find out if it would be attractive for me to contribute again in the future. I am strictly against the policy in so many OSS projects that PRs get micro-managed in many iterations up to the point in which the contributor, not unlike a remote-controlled puppet, has shaped the code into something resembling what the reviewer would have written by herself. Better to accept an imperfect, but valuable PR and help polishing it by yourself. Then chances are much higher that the code ends up the way you like it as a maintainer. Also, the contributor can learn from the edits. Win-win.

Use Buffer instead of ByteBuffer in method
StatelessXmlReporterTest.testSyncOnDeferredFile() in order to avoid
casts and still be compatible with JDK 8.
@Tibor17
Copy link
Contributor

Tibor17 commented Jan 27, 2021

@kriegaex
Are you willing to be invited to our Apache Slack channel? Maybe just like a coacher or a friend and contributor.
I know that technically it is possible via an email but i do not see your email.

@Tibor17 Tibor17 merged commit 05c3f34 into apache:master Jan 27, 2021
@Tibor17
Copy link
Contributor

Tibor17 commented Jan 27, 2021

@kriegaex
Thx for contributing!

@kriegaex
Copy link
Contributor Author

@Tibor17, thanks for the Slack invitation. Please contact me through one of the channels listed on my StackOverflow profile (scroll to the bottom of my profile text), e.g. Gitter or Telegram. There I can tell you my e-mail address.

@Tibor17
Copy link
Contributor

Tibor17 commented Feb 5, 2021

@kriegaex
The Apache changed the politcy and so only people with apache.org can be invited via e-mail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants