private void initJob() { final String jobStr = properties.getProperty(PROPERTY_JOB); GameJob job = JOB_DEFAULT; if (jobStr != null) { try { job = GameJob.valueOf(jobStr); } catch (IllegalArgumentException e) { logger.warn(WARN_MSG_INVALID_VALUE, jobStr, PROPERTY_JOB); } } properties.setProperty(PROPERTY_JOB, job.name()); }
@Override public synchronized GameJob getJob() { return GameJob.valueOf(properties.getProperty(PROPERTY_JOB)); }