svnno****@sourc*****
svnno****@sourc*****
2009年 4月 7日 (火) 10:02:00 JST
Revision: 3150 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3150 Author: daisuke_m Date: 2009-04-07 10:02:00 +0900 (Tue, 07 Apr 2009) Log Message: ----------- jiemamy-commons追加に伴う微調整。 Modified Paths: -------------- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/JmIOUtil.java leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java metis/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java Added Paths: ----------- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/JiemamyError.java Removed Paths: ------------- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/UnexpectedConditionError.java -------------- next part -------------- Added: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/JiemamyError.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/JiemamyError.java (rev 0) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/JiemamyError.java 2009-04-07 01:02:00 UTC (rev 3150) @@ -0,0 +1,56 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2008/12/01 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.exception; + +/** + * Jiemamyの実装バグが原因であることによるエラー。 + * + * <ul> + * <li>http://d.hatena.ne.jp/daisuke-m/20081201/1228095493</li> + * <li>http://d.hatena.ne.jp/daisuke-m/20081202/1228221927</li> + * </ul> + * + * @since 0.2 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class JiemamyError extends Error { + + /** + * インスタンスを生成する。 + * + * @param message 例外メッセージ(エラーが発生した状況、考えられる原因など、なるべく詳細に記載すること) + * @since 0.2 + */ + public JiemamyError(String message) { + super(message); + } + + /** + * インスタンスを生成する。 + * + * @param message 例外メッセージ(エラーが発生した状況、考えられる原因など、なるべく詳細に記載すること) + * @param cause 起因例外 + * @since 0.2 + */ + public JiemamyError(String message, Throwable cause) { + super(message, cause); + } + +} Property changes on: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/JiemamyError.java ___________________________________________________________________ Added: svn:mime-type + text/plain Deleted: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/UnexpectedConditionError.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/UnexpectedConditionError.java 2009-04-07 01:01:08 UTC (rev 3149) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/exception/UnexpectedConditionError.java 2009-04-07 01:02:00 UTC (rev 3150) @@ -1,56 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on 2008/12/01 - * - * This file is part of Jiemamy. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.jiemamy.exception; - -/** - * Jiemamyの実装バグが原因であることによるエラー。 - * - * <ul> - * <li>http://d.hatena.ne.jp/daisuke-m/20081201/1228095493</li> - * <li>http://d.hatena.ne.jp/daisuke-m/20081202/1228221927</li> - * </ul> - * - * @since 0.2 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class UnexpectedConditionError extends Error { - - /** - * インスタンスを生成する。 - * - * @param message 例外メッセージ(エラーが発生した状況、考えられる原因など、なるべく詳細に記載すること) - * @since 0.2 - */ - public UnexpectedConditionError(String message) { - super(message); - } - - /** - * インスタンスを生成する。 - * - * @param message 例外メッセージ(エラーが発生した状況、考えられる原因など、なるべく詳細に記載すること) - * @param cause 起因例外 - * @since 0.2 - */ - public UnexpectedConditionError(String message, Throwable cause) { - super(message, cause); - } - -} Modified: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/JmIOUtil.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/JmIOUtil.java 2009-04-07 01:01:08 UTC (rev 3149) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/JmIOUtil.java 2009-04-07 01:02:00 UTC (rev 3150) @@ -25,7 +25,6 @@ import org.apache.commons.io.IOUtils; -import org.jiemamy.exception.UnexpectedConditionError; import org.jiemamy.utils.metadata.TypeSafeDatabaseMetaData.IterableResult; /** @@ -131,6 +130,5 @@ * ユーティリティクラス。 */ private JmIOUtil() { - throw new UnexpectedConditionError("不到達ポイント"); } } Modified: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java 2009-04-07 01:01:08 UTC (rev 3149) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java 2009-04-07 01:02:00 UTC (rev 3150) @@ -31,7 +31,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.jiemamy.exception.UnexpectedConditionError; +import org.jiemamy.exception.JiemamyError; /** * {@link DatabaseMetaData}の情報をタイプセーフに取り扱うためのラッパークラス。 @@ -481,17 +481,17 @@ Constructor<T> constructor = resultClass.getConstructor(ResultSet.class); return constructor.newInstance(resultSet); } catch (SecurityException e) { - throw new UnexpectedConditionError("unknown", e); + throw new JiemamyError("unknown", e); } catch (NoSuchMethodException e) { - throw new UnexpectedConditionError("resultClass must have ResultSet constructor.", e); + throw new JiemamyError("resultClass must have ResultSet constructor.", e); } catch (IllegalArgumentException e) { - throw new UnexpectedConditionError("unknown", e); + throw new JiemamyError("Coding miss.", e); } catch (InstantiationException e) { - throw new UnexpectedConditionError("unknown", e); + throw new JiemamyError("resultClass must not be abstract class.", e); } catch (IllegalAccessException e) { - throw new UnexpectedConditionError("resultClass must have public constructor.", e); + throw new JiemamyError("resultClass must have public constructor.", e); } catch (InvocationTargetException e) { - throw new UnexpectedConditionError("resultClass construction failed.", e); + throw new JiemamyError("resultClass construction failed.", e); } catch (SQLException e) { logger.warn("SQLException", e); // ignore Modified: metis/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java =================================================================== --- metis/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java 2009-04-07 01:01:08 UTC (rev 3149) +++ metis/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java 2009-04-07 01:02:00 UTC (rev 3150) @@ -14,11 +14,11 @@ import org.jiemamy.dialect.BuiltinDataTypeMold; import org.jiemamy.dialect.Dialect; import org.jiemamy.dialect.mysql.MySqlDialect; -import org.jiemamy.internal.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.datatype.BuiltinDataType; import org.jiemamy.model.datatype.DataTypeCategory; +import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.model.entity.TableModel; import org.jiemamy.serializer.JiemamySerializer; import org.jiemamy.utils.model.RootModelUtil;