dev@glassfish.java.net

[V3] How to integrate new version of auto-depends?

From: <Jan.Luehe_at_Sun.COM>
Date: Thu, 07 Aug 2008 13:56:48 -0700

I'm facing a NPE in Habitat.java.

The attached diffs fix it.

When I rebuild hk2/auto-depends (which is where Habitat.java lives),
it increments the version from

  auto-depends-0.3.10-SNAPSHOT.jar

to

  auto-depends-0.3.11-SNAPSHOT.jar

Can someone remind me of the places (in V3) I need to change in order for
V3 to pick up this new version?

Thanks,


Jan



Index: auto-depends/src/java/org/jvnet/hk2/component/Habitat.java
===================================================================
--- auto-depends/src/java/org/jvnet/hk2/component/Habitat.java (revision 775)
+++ auto-depends/src/java/org/jvnet/hk2/component/Habitat.java (working copy)
@@ -179,8 +179,9 @@
         if (byContract.containsKey(index)) {
             List<NamedInhabitant> contracted = byContract.get(index);
             for (NamedInhabitant i : contracted) {
- if ((i.name==null && name==null) || i.name.equals(name)) {
- return contracted.remove(i);
+ if ((i.name==null && name==null) ||
+ (i.name != null && i.name.equals(name))) {
+ return contracted.remove(i);
                 }
             }
         }