evenisse    2003/08/27 09:28:02

  Modified:    src/java/org/apache/maven/project Dependency.java
  Log:
  Test if type has a null value.
  
  Revision  Changes    Path
  1.39      +12 -4     maven/src/java/org/apache/maven/project/Dependency.java
  
  Index: Dependency.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Dependency.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Dependency.java   25 Aug 2003 04:26:54 -0000      1.38
  +++ Dependency.java   27 Aug 2003 16:28:02 -0000      1.39
  @@ -354,8 +354,12 @@
        */
       public boolean isAddedToClasspath()
       {
  -        String artifactType = type.getType();
  -        return artifactType.equals("jar") || artifactType.equalsIgnoreCase("ejb");
  +        if (type != null)
  +        {
  +            String artifactType = type.getType();
  +            return artifactType.equals("jar") || 
artifactType.equalsIgnoreCase("ejb");
  +        }
  +        return false;
       }
   
       /**
  @@ -363,6 +367,10 @@
        */
       public boolean isPlugin()
       {
  -        return type.getType().equals("plugin");
  +        if (type != null)
  +        {
  +            return type.getType().equals("plugin");
  +        }
  +        return false;
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to