Title: [2088] trunk/xstream/src/java/com/thoughtworks/xstream/core/util/DependencyInjectionFactory.java: Make Java 6 compatible.
Revision
2088
Author
joehni
Date
2013-07-03 17:24:20 -0500 (Wed, 03 Jul 2013)

Log Message

Make Java 6 compatible.

Modified Paths


Diff

Modified: trunk/xstream/src/java/com/thoughtworks/xstream/core/util/DependencyInjectionFactory.java (2087 => 2088)


--- trunk/xstream/src/java/com/thoughtworks/xstream/core/util/DependencyInjectionFactory.java	2013-07-03 21:16:38 UTC (rev 2087)
+++ trunk/xstream/src/java/com/thoughtworks/xstream/core/util/DependencyInjectionFactory.java	2013-07-03 22:24:20 UTC (rev 2088)
@@ -12,6 +12,7 @@
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
+import java.nio.LongBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.BitSet;
@@ -215,7 +216,12 @@
             }
             if (usedDependencies != null) {
                 usedDependencies.clear();
-                usedDependencies.or(BitSet.valueOf(new long[]{usedDeps}));
+                int i = 0;
+                for(long l = 1; l < usedDeps; l <<= 1, ++i) {
+                    if ((usedDeps & l) > 0) {
+                        usedDependencies.set(i);
+                    }
+                }
             }
             return instance;
         } catch (final InstantiationException e) {

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to