[Jiemamy-notify:1411] commit [2647] nullの場合、バリデーションを通すように変更。

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2009年 2月 10日 (火) 01:21:25 JST


Revision: 2647
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2647
Author:   daisuke_m
Date:     2009-02-10 01:21:25 +0900 (Tue, 10 Feb 2009)

Log Message:
-----------
nullの場合、バリデーションを通すように変更。

Modified Paths:
--------------
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/validator/impl/AbstractIdentifierValidator.java


-------------- next part --------------
Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/validator/impl/AbstractIdentifierValidator.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/validator/impl/AbstractIdentifierValidator.java	2009-02-09 15:37:06 UTC (rev 2646)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/validator/impl/AbstractIdentifierValidator.java	2009-02-09 16:21:25 UTC (rev 2647)
@@ -90,16 +90,19 @@
 	}
 	
 	boolean check(String name) {
-		boolean result = false;
+		if (name == null) {
+			return false;
+		}
+		boolean invalid = false;
 		if (identifierPattern.matcher(name).matches() == false) {
 			// UNDONE 正規表現にマッチしないProblem
-			result = true;
+			invalid = true;
 		}
 		if (ArrayUtils.contains(reservedWords.getReservedWords(), name)) {
 			// UNDONE 予約語と衝突したProblem
-			result = true;
+			invalid = true;
 		}
-		return result;
+		return invalid;
 	}
 	
 }



Jiemamy-notify メーリングリストの案内
Zurück zum Archiv-Index