[Jiemamy-notify:2182] commit [3246] リファクタリング

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 13日 (月) 12:37:26 JST


Revision: 3246
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3246
Author:   j5ik2o
Date:     2009-04-13 12:37:26 +0900 (Mon, 13 Apr 2009)

Log Message:
-----------
リファクタリング

Modified Paths:
--------------
    leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaReaderImpl.java
    leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterFactoryImpl.java
    leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterImpl.java


-------------- next part --------------
Modified: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaReaderImpl.java
===================================================================
--- leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaReaderImpl.java	2009-04-13 03:34:21 UTC (rev 3245)
+++ leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaReaderImpl.java	2009-04-13 03:37:26 UTC (rev 3246)
@@ -150,7 +150,6 @@
 							} catch (ClassNotFoundException e) {
 								throw new TraversalHandlerException(e);
 							} catch (NonEntityException e) {
-								LOG.debug("", e);
 								throw new TraversalHandlerException(e);
 							}
 						}

Modified: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterFactoryImpl.java
===================================================================
--- leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterFactoryImpl.java	2009-04-13 03:34:21 UTC (rev 3245)
+++ leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterFactoryImpl.java	2009-04-13 03:37:26 UTC (rev 3246)
@@ -18,6 +18,8 @@
  */
 package org.jiemamy.entity.io.meta.impl;
 
+import org.apache.commons.lang.Validate;
+
 import org.jiemamy.entity.io.meta.EntityMetaWriter;
 import org.jiemamy.entity.io.meta.EntityMetaWriterContext;
 import org.jiemamy.entity.io.meta.EntityMetaWriterFactory;
@@ -30,6 +32,7 @@
 public class EntityMetaWriterFactoryImpl implements EntityMetaWriterFactory {
 	
 	public EntityMetaWriter createEntityMetaWriter(EntityMetaWriterContext entityMetaWriterContext) {
+		Validate.notNull(entityMetaWriterContext);
 		return new EntityMetaWriterImpl(entityMetaWriterContext);
 	}
 	

Modified: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterImpl.java
===================================================================
--- leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterImpl.java	2009-04-13 03:34:21 UTC (rev 3245)
+++ leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/meta/impl/EntityMetaWriterImpl.java	2009-04-13 03:37:26 UTC (rev 3246)
@@ -22,6 +22,8 @@
 import java.io.IOException;
 import java.util.List;
 
+import org.apache.commons.lang.Validate;
+
 import org.jiemamy.entity.io.meta.EntityMeta;
 import org.jiemamy.entity.io.meta.EntityMetaWriter;
 import org.jiemamy.entity.io.meta.EntityMetaWriterContext;
@@ -46,10 +48,14 @@
 	 * @param entityMetaWriterContext {@link EntityMetaWriterContext}
 	 */
 	public EntityMetaWriterImpl(EntityMetaWriterContext entityMetaWriterContext) {
+		Validate.notNull(entityMetaWriterContext);
+		Validate.notNull(entityMetaWriterContext.getJavaFileEncoding());
+		Validate.notNull(entityMetaWriterContext.getTemplateName());
 		this.entityMetaWriterContext = entityMetaWriterContext;
 	}
 	
 	public void write(List<EntityMeta> entityMetaList) throws IOException {
+		Validate.notNull(entityMetaList);
 		GeneratorContextImpl context = new GeneratorContextImpl();
 		context.setEncoding(entityMetaWriterContext.getJavaFileEncoding());
 		context.setOverwrite(entityMetaWriterContext.getOverwrite());



Jiemamy-notify メーリングリストの案内
Back to archive index