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
Member

commented Aug 2, 2019

No description provided.

@Cousjava Cousjava added this to the 5.193 milestone Aug 2, 2019

@Cousjava

This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2019

Jenkins test please

@jbee
Copy link
Contributor

left a comment

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)) {

This comment has been minimized.

Copy link
@jbee

jbee Aug 5, 2019

Contributor

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() {

This comment has been minimized.

Copy link
@jbee

jbee Aug 5, 2019

Contributor

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.

@cubastanley
Copy link
Contributor

left a comment

Just a couple typos but otherwise very awesome

@Pandrex247

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

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

@jbee

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

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

Cousjava added 2 commits Aug 19, 2019
@Cousjava

This comment has been minimized.

Copy link
Member Author

commented Aug 19, 2019

Jenkins test please

@Cousjava Cousjava requested a review from jbee Aug 19, 2019

@jbee
jbee approved these changes Aug 19, 2019
Copy link
Contributor

left a comment

Nice.

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

This comment has been minimized.

Copy link
@jbee

jbee Aug 19, 2019

Contributor

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

@Cousjava Cousjava merged commit a75c37f into payara:master Aug 20, 2019

58 of 59 checks passed

security/snyk - appserver/javaee-api/pom.xml (payara-ci) Manifest not found
Details
Payara Quick Build and Test Quick build and test passed!
Details
security/snyk - api/payara-api/pom.xml (payara-ci) No new issues
Details
security/snyk - api/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admingui/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ant-tasks/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/appclient/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/batch/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/common/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/concurrent/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/connectors/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/core/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ejb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/extras/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/featuresets/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ha/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/installer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jdbc/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/load-balancer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/orb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/payara-appserver-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/persistence/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/registration/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/security/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/transaction/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/web/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/webservices/pom.xml (payara-ci) No new issues
Details
security/snyk - copyright/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/cluster/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/common/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/core/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/diagnostics/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/hk2/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/payara-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources-l10n/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/security/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/test-utils/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - pom.xml (payara-ci) No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.