Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.
This commit is contained in:
		@@ -21,7 +21,7 @@ import org.apache.log4j.Logger;
 | 
			
		||||
 */
 | 
			
		||||
public class App {
 | 
			
		||||
 | 
			
		||||
  private static Logger LOGGER = Logger.getLogger(App.class);
 | 
			
		||||
  private static Logger log = Logger.getLogger(App.class);
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Program entry point.
 | 
			
		||||
@@ -30,17 +30,17 @@ public class App {
 | 
			
		||||
   */
 | 
			
		||||
  public static void main(final String[] args) {
 | 
			
		||||
    final CustomerDaoImpl customerDao = new CustomerDaoImpl(generateSampleCustomers());
 | 
			
		||||
    LOGGER.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    LOGGER.info("customerDao.getCusterById(2): " + customerDao.getCustomerById(2));
 | 
			
		||||
    log.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    log.info("customerDao.getCusterById(2): " + customerDao.getCustomerById(2));
 | 
			
		||||
    final Customer customer = new Customer(4, "Dan", "Danson");
 | 
			
		||||
    customerDao.addCustomer(customer);
 | 
			
		||||
    LOGGER.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    log.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    customer.setFirstName("Daniel");
 | 
			
		||||
    customer.setLastName("Danielson");
 | 
			
		||||
    customerDao.updateCustomer(customer);
 | 
			
		||||
    LOGGER.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    log.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    customerDao.deleteCustomer(customer);
 | 
			
		||||
    LOGGER.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
    log.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,9 @@ public class Customer {
 | 
			
		||||
  private String firstName;
 | 
			
		||||
  private String lastName;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Constructor
 | 
			
		||||
   */
 | 
			
		||||
  public Customer(final int id, final String firstName, final String lastName) {
 | 
			
		||||
    this.id = id;
 | 
			
		||||
    this.firstName = firstName;
 | 
			
		||||
@@ -54,8 +57,9 @@ public class Customer {
 | 
			
		||||
      isEqual = true;
 | 
			
		||||
    } else if (o != null && (getClass() == o.getClass())) {
 | 
			
		||||
      final Customer customer = (Customer) o;
 | 
			
		||||
      if (getId() == customer.getId())
 | 
			
		||||
      if (getId() == customer.getId()) {
 | 
			
		||||
        isEqual = true;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    return isEqual;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,17 +1,17 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" ?>
 | 
			
		||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 | 
			
		||||
<log4j:configuration debug="true"
 | 
			
		||||
	xmlns:log4j='http://jakarta.apache.org/log4j/'>
 | 
			
		||||
  xmlns:log4j='http://jakarta.apache.org/log4j/'>
 | 
			
		||||
 | 
			
		||||
	<appender name="console" class="org.apache.log4j.ConsoleAppender">
 | 
			
		||||
		<layout class="org.apache.log4j.PatternLayout">
 | 
			
		||||
			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
 | 
			
		||||
		</layout>
 | 
			
		||||
	</appender>
 | 
			
		||||
  <appender name="console" class="org.apache.log4j.ConsoleAppender">
 | 
			
		||||
    <layout class="org.apache.log4j.PatternLayout">
 | 
			
		||||
      <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
 | 
			
		||||
    </layout>
 | 
			
		||||
  </appender>
 | 
			
		||||
 | 
			
		||||
	<root>
 | 
			
		||||
		<level value="INFO" />
 | 
			
		||||
		<appender-ref ref="console" />
 | 
			
		||||
	</root>
 | 
			
		||||
  <root>
 | 
			
		||||
    <level value="INFO" />
 | 
			
		||||
    <appender-ref ref="console" />
 | 
			
		||||
  </root>
 | 
			
		||||
 | 
			
		||||
</log4j:configuration>
 | 
			
		||||
		Reference in New Issue
	
	Block a user