You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/01/13 06:33:11 UTC
cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/project Repository.java
jvanzyl 2003/01/12 21:33:11
Modified: src/java/org/apache/maven/project Repository.java
Log:
o Guard against the connection being null.
Revision Changes Path
1.11 +17 -3 jakarta-turbine-maven/src/java/org/apache/maven/project/Repository.java
Index: Repository.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/Repository.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Repository.java 31 Dec 2002 07:03:25 -0000 1.10
+++ Repository.java 13 Jan 2003 05:33:10 -0000 1.11
@@ -61,7 +61,11 @@
* package like subversion ASAP.
*
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
+ *
* @version $Id$
+ *
+ * @todo Check on the CVS specific methods at the bottom of this file. I believe they
+ * are used by the gump plugin.
*/
public class Repository
extends BaseObject
@@ -119,7 +123,12 @@
*/
public String getCvsRoot()
{
- return connection.substring( 0, connection.lastIndexOf( ":" ) ).substring( 7 );
+ if ( isValid( getConnection() ) )
+ {
+ return getConnection().substring( 0, connection.lastIndexOf( ":" ) ).substring( 7 );
+ }
+
+ return null;
}
/**
@@ -129,6 +138,11 @@
*/
public String getCvsModule()
{
- return connection.substring( connection.lastIndexOf( ":" ) + 1 );
+ if ( isValid( getConnection() ) )
+ {
+ return getConnection().substring( connection.lastIndexOf( ":" ) + 1 );
+ }
+
+ return null;
}
}