Mark fields as final in VerificationData and ContactFormData
The 'code', 'eMail' fields in the VerificationData class and 'username', 'email', 'question' fields in the ContactFormData class are now marked as 'final'. At the same time, some unused imports from ContactController, ContactFormData, FormQuery, and VerifyController have been removed for code cleanliness.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.alttd.forms.verify_mail;
|
||||
|
||||
import com.alttd.forms.contact.ContactFormData;
|
||||
import com.alttd.forms.contact.StoreFormQuery;
|
||||
import com.alttd.forms.database.DatabaseConnection;
|
||||
import com.alttd.forms.form.Form;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
@@ -11,12 +11,12 @@ public class VerificationData {
|
||||
}
|
||||
|
||||
@NotBlank(message = "You must provide a valid code")
|
||||
String code;
|
||||
final String code;
|
||||
|
||||
@NotBlank(message = "You must provide an email")
|
||||
@Email(regexp = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])",
|
||||
message = "This is not a valid e-mail address")
|
||||
String eMail;
|
||||
final String eMail;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.alttd.forms.verify_mail;
|
||||
|
||||
import com.alttd.forms.form.Form;
|
||||
import com.alttd.forms.mail.mail_forms.MailForm;
|
||||
import jakarta.validation.Valid;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
Reference in New Issue
Block a user