continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r442467 - /maven/continuum/branches/continuum-acegi/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Date Tue, 12 Sep 2006 06:01:33 GMT
Author: carlos
Date: Mon Sep 11 23:01:32 2006
New Revision: 442467

URL: http://svn.apache.org/viewvc?view=rev&rev=442467
Log:
Create default project group on initialization

Modified:
    maven/continuum/branches/continuum-acegi/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

Modified: maven/continuum/branches/continuum-acegi/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?view=diff&rev=442467&r1=442466&r2=442467
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Mon Sep 11 23:01:32 2006
@@ -87,8 +87,6 @@
 
     private static final String PROJECTGROUP_PROJECTS_FETCH_GROUP = "projectgroup-projects";
 
-    private static final String DEFAULT_GROUP_ID = "default";
-
     // ----------------------------------------------------------------------
     // Component Lifecycle
     // ----------------------------------------------------------------------
@@ -1125,22 +1123,8 @@
     public ProjectGroup getDefaultProjectGroup()
         throws ContinuumStoreException
     {
-        ProjectGroup group;
-
-        try
-        {
-            group = (ProjectGroup) getObjectFromQuery( ProjectGroup.class, "groupId", DEFAULT_GROUP_ID,
-                                                       PROJECTGROUP_PROJECTS_FETCH_GROUP
);
-        }
-        catch ( ContinuumObjectNotFoundException e )
-        {
-            group = new ProjectGroup();
-            group.setName( "Default Project Group" );
-            group.setGroupId( DEFAULT_GROUP_ID );
-            group.setDescription( "Contains all projects that do not have a group of their
own" );
-            group = addProjectGroup( group );
-        }
-        return group;
+        return (ProjectGroup) getObjectFromQuery( ProjectGroup.class, "groupId", DEFAULT_GROUP_ID,
+                                                  PROJECTGROUP_PROJECTS_FETCH_GROUP );
     }
 
     public SystemConfiguration addSystemConfiguration( SystemConfiguration systemConf )



Mime
View raw message