Update of /cvsroot/fb-contrib/fb-contrib/samples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16902/samples
Modified Files:
NAB_Sample.java
Log Message:
embellish the NAB detector to find
BoxPrimitive.valueOf(BoxedPrimitive)
Index: NAB_Sample.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/samples/NAB_Sample.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- NAB_Sample.java 3 Dec 2005 03:33:24 -0000 1.1
+++ NAB_Sample.java 17 Dec 2005 04:31:00 -0000 1.2
@@ -1,7 +1,7 @@
public class NAB_Sample
{
- public void test()
+ public void testDupCtor()
{
Boolean bo = new Boolean(false);
Boolean bbo = new Boolean(bo);
@@ -20,4 +20,24 @@
Double d = new Double(0.0);
Double dd = new Double(d);
}
+
+ public void testDupValueOf()
+ {
+ Boolean bo = new Boolean(false);
+ Boolean bbo = Boolean.valueOf(bo);
+ Byte b = new Byte((byte)0);
+ Byte bb = Byte.valueOf(b);
+ Character c = new Character('a');
+ Character cc = Character.valueOf(c);
+ Short s = new Short((short) 0);
+ Short ss = Short.valueOf(s);
+ Integer i = new Integer(0);
+ Integer ii = Integer.valueOf(i);
+ Long l = new Long(0);
+ Long ll = Long.valueOf(l);
+ Float f = new Float(0.0f);
+ Float ff = Float.valueOf(f);
+ Double d = new Double(0.0);
+ Double dd = Double.valueOf(d);
+ }
}
|