axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r469393 - /webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
Date Tue, 31 Oct 2006 07:04:31 GMT
Author: thilina
Date: Mon Oct 30 23:04:30 2006
New Revision: 469393

URL: http://svn.apache.org/viewvc?view=rev&rev=469393
Log:
improving the package name validator to use a regex 

Modified:
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java?view=diff&rev=469393&r1=469392&r2=469393
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
Mon Oct 30 23:04:30 2006
@@ -307,18 +307,13 @@
         return null;
     }
 
-    public boolean validatePackageName(String name){
-        if (name.trim().equalsIgnoreCase(""))
-        return false;
-        String[] parts = new String[10];
-         parts = name.split("\\.");
-        for(int count=0;count<parts.length;count++)
-        {
-            if (parts[count].trim().equalsIgnoreCase(""))
-            return false;
-        }
-        return true;
-    }
+     public boolean validatePackageName(String name){
+
+       if(name.matches("[a-z]([a-z0-9_]+\\.?)+[a-z0-9_]"))
+       return true;
+
+       return false;
+   }
 
     public void backButtonImpl(){
         panleID--;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message