foul-magics/Mage.Server/src/main/java/mage/server/services/impl/FeedbackServiceImpl.java
vraskulin 46d369c8ed Big refactoring (server)
I used Intellij IDEA to automatically refactor code to achive 3 goals.
1) get rid of anonymouse classes, and replace the with lamba to get more readeable and clean code (like in TableWaitingDialog).
2) make effectively final  variables actually final to avoid inadvertent changes on it in further releases and keep objects as immutable, as possible.
3)  Get rid of unused imports (most of the changes) in whole project classes.
2017-01-09 19:47:03 +03:00

26 lines
732 B
Java

package mage.server.services.impl;
import mage.db.EntityManager;
import mage.server.services.FeedbackService;
import org.apache.log4j.Logger;
import java.util.Calendar;
/**
* @author noxx
*/
public enum FeedbackServiceImpl implements FeedbackService {
instance;
private static final Logger log = Logger.getLogger(FeedbackServiceImpl.class);
@Override
public void feedback(String username, String title, String type, String message, String email, String host) {
Calendar cal = Calendar.getInstance();
try {
EntityManager.instance.insertFeedback(username, title, type, message, email, host, cal.getTime());
} catch (Exception e) {
log.fatal(e);
}
}
}