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

Add removed constructor to restore backward compatibility #22589

Closed
wants to merge 1 commit into from
Closed

Add removed constructor to restore backward compatibility #22589

wants to merge 1 commit into from

Conversation

fitmanyak
Copy link

Add removed constructor to com.sun.enterprise.admin.util.AuthenticationInfo to restore backward compatibility. This fixes https://youtrack.jetbrains.com/issue/IDEA-194181 .

* @param password the clear text password for the connection
*/
public AuthenticationInfo(String user, String password) {
this(user, password.toCharArray());
Copy link
Contributor

Choose a reason for hiding this comment

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

👎 I've seen many recommendations to avoid using String for password passing, none in favour of it.

Copy link
Contributor

Choose a reason for hiding this comment

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

this is adding in a previously removed constructor which IntelliJ uses changing to char[] would again break IntelliJ. So the question is should we fix IntelliJ support or should IntelliJ fix the plugin?

Copy link
Contributor

Choose a reason for hiding this comment

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

Marc reported

From IntelliJ IDEA 2018.2.4 build 18 Sept. 2018, did NOT encounter the problem anymore.

Copy link
Author

Choose a reason for hiding this comment

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

Problem is still reproducing with any version of IntelliJ IDEA. But backward compatibility was restored in Payara (payara/Payara#2328).

Copy link
Contributor

Choose a reason for hiding this comment

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

Problem is still reproducing with any version of IntelliJ IDEA.

Yet Marc' comment for IDEA-194181 remains uncorrected.

But backward compatibility was restored in Payara (payara/Payara#2328).

IMO - it's bad idea to have this Ctor back just for testability. Should be fixed in Intelli-J or other clients.
It is class in com.sun package, and some, first example from @BalusC recommend:

It's preferable to not use those classes directly in your code as it would make your code tight coupled to the implementation.

Thus - developers shall follow changes in API used.

@fitmanyak fitmanyak closed this Oct 29, 2018
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.

3 participants