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

PAYARA-4034 Cleanup sonar warnings for nucleus/common/amx-core #4124

Merged
merged 4 commits into from
Aug 20, 2019

Conversation

Cousjava
Copy link
Contributor

@Cousjava Cousjava commented Aug 2, 2019

No description provided.

@Cousjava Cousjava added this to the 5.193 milestone Aug 2, 2019
@Cousjava
Copy link
Contributor Author

Cousjava commented Aug 2, 2019

Jenkins test please

Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

Great work @Cousjava. Two issues that should be addressed. There was an unfinished merge and one place where change from + to append did flip the arguments. Added some other suggestions as well.

Maybe you should also look into your setting for automatic formatting (I assume) of class level javadoc. That was sometimes smashed together in a way I feel it should not.

@@ -306,7 +305,7 @@ public String getAnonymousUser() {

// Get FileRealm class name
String fileRealmClassName = adminFileAuthRealm.getClassname();
if (fileRealmClassName != null && !fileRealmClassName.equals(FILE_REALM_CLASSNAME)) {
if (!fileRealmClassName.equals(FILE_REALM_CLASSNAME)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd reverse the arguments because we are 100% sure FILE_REALM_CLASSNAME isn't null while getClassname() could change and return null at some point.


public static final ReadWriteAttributeFilter READ_ONLY_FILTER = new ReadWriteAttributeFilter() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these all could be lambdas since it is not important that they implement the ReadWriteAttributeFilter but the AttributeFilter interface. If another type distinction is wanted the ReadWriteAttributeFilter could also be made an interface I think.

Copy link
Contributor

@cubastanley cubastanley left a comment

Choose a reason for hiding this comment

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

Just a couple typos but otherwise very awesome

@Pandrex247
Copy link
Member

a) Conflicts
b) Although the build has been deleted due to it being too old, this actually simply failed to compile

@jbee
Copy link
Contributor

jbee commented Aug 19, 2019

@Pandrex247 , @Cousjava compilation failure is likely to be caused by unfinished merge in one file.

@Cousjava
Copy link
Contributor Author

Jenkins test please

@Cousjava Cousjava requested a review from jbee August 19, 2019 10:08
Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

Nice.

default:
theSet = new HashSet<T>();
Set<T> theSet = new HashSet<T>();
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use new HashSet<T>(Arrays.asList(array));

@Cousjava Cousjava merged commit a75c37f into payara:master Aug 20, 2019
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.

5 participants