marta-jankovics commented on code in PR #3321:
URL: https://github.com/apache/fineract/pull/3321#discussion_r1281646312
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseType.java:
##########
@@ -19,5 +19,16 @@
package org.apache.fineract.infrastructure.core.service.database;
public enum DatabaseType {
- MYSQL, POSTGRESQL
+
+ MYSQL, //
+ POSTGRESQL, //
+ ;
+
+ public boolean isMySql() {
Review Comment:
This enum is not new.
For enums the == comparison is better because
- enums are singleton classes and it never happens that the same enum is not
identical with itself
- implementation of equals for enums is actually ==
- == is null safe
- == shows what it is, does not give the impression as if it could be not t
In my opinion enum is better than static string because
- it can have its own functionality
- type safe and value safe
- singleton and identical
- ability to use as list type
- serialised by name (not by value)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]