boot/src/test/java/org/netbeans/html/boot/impl/JsClassLoaderBase.java
changeset 1041 36165f49f598
parent 933 9d158eb4a797
child 1043 b189d001b9bd
     1.1 --- a/boot/src/test/java/org/netbeans/html/boot/impl/JsClassLoaderBase.java	Sat Apr 11 07:41:04 2015 +0200
     1.2 +++ b/boot/src/test/java/org/netbeans/html/boot/impl/JsClassLoaderBase.java	Fri Jan 15 11:40:28 2016 +0100
     1.3 @@ -46,8 +46,6 @@
     1.4  import java.lang.reflect.InvocationTargetException;
     1.5  import java.lang.reflect.Method;
     1.6  import java.lang.reflect.Modifier;
     1.7 -import java.util.logging.Level;
     1.8 -import java.util.logging.Logger;
     1.9  import org.netbeans.html.boot.spi.Fn;
    1.10  import org.testng.Assert;
    1.11  import static org.testng.Assert.*;
    1.12 @@ -72,7 +70,7 @@
    1.13      @Test public void noParamMethod() throws Throwable {
    1.14          Method plus = methodClass.getMethod("fortyTwo");
    1.15          try {
    1.16 -            final Object val = plus.invoke(null);
    1.17 +            final java.lang.Object val = plus.invoke(null);
    1.18              assertTrue(val instanceof Number, "A number returned " + val);
    1.19              assertEquals(((Number)val).intValue(), 42);
    1.20          } catch (InvocationTargetException ex) {
    1.21 @@ -100,7 +98,7 @@
    1.22      
    1.23      @Test public void instanceMethod() throws Throwable {
    1.24          Method plus = methodClass.getMethod("plusInst", int.class);
    1.25 -        Object inst = methodClass.newInstance();
    1.26 +        java.lang.Object inst = methodClass.newInstance();
    1.27          try {
    1.28              assertEquals(plus.invoke(inst, 10), 10);
    1.29          } catch (InvocationTargetException ex) {
    1.30 @@ -118,7 +116,7 @@
    1.31      }
    1.32  
    1.33      @Test public void getThis() throws Throwable {
    1.34 -        Object th = methodClass.newInstance();
    1.35 +        java.lang.Object th = methodClass.newInstance();
    1.36          Method st = methodClass.getMethod("getThis");
    1.37          try {
    1.38              assertEquals(st.invoke(th), th);
    1.39 @@ -166,7 +164,7 @@
    1.40      
    1.41      @Test public void callJavaScriptMethodOnOwnClass() throws Throwable {
    1.42          try {
    1.43 -            Object thiz = methodClass.newInstance();
    1.44 +            java.lang.Object thiz = methodClass.newInstance();
    1.45              Method st = methodClass.getMethod("returnYourSelf", methodClass);
    1.46              assertEquals(st.invoke(null, thiz), thiz, "Returns this");
    1.47          } catch (InvocationTargetException ex) {
    1.48 @@ -190,7 +188,7 @@
    1.49          Class<? extends Enum> enmClazz2 = enmClazz.asSubclass(Enum.class);
    1.50          Method st = methodClass.getMethod("fromEnum", enmClazz);
    1.51          
    1.52 -        Object valueB = Enum.valueOf(enmClazz2, "B");
    1.53 +        java.lang.Object valueB = Enum.valueOf(enmClazz2, "B");
    1.54          assertEquals(st.invoke(null, valueB), "B", "Converts to string");
    1.55      }
    1.56      
    1.57 @@ -210,7 +208,7 @@
    1.58      }
    1.59      
    1.60      @Test public void recordError() throws Throwable {
    1.61 -        Method st = methodClass.getMethod("recordError", Object.class);
    1.62 +        Method st = methodClass.getMethod("recordError", java.lang.Object.class);
    1.63          assertEquals(st.invoke(methodClass.newInstance(), "Hello"), "Hello", "The same parameter returned");
    1.64      }
    1.65      
    1.66 @@ -239,10 +237,10 @@
    1.67      
    1.68      @Test public void arrayInOut() throws Throwable {
    1.69          String[] arr = { "Ahoj" };
    1.70 -        Method st = methodClass.getMethod("arr", Object[].class);
    1.71 -        Object ret = st.invoke(null, (Object) arr);
    1.72 -        assertTrue(ret instanceof Object[], "Expecting array: " + ret);
    1.73 -        Object[] res = (Object[]) ret;
    1.74 +        Method st = methodClass.getMethod("arr", java.lang.Object[].class);
    1.75 +        java.lang.Object ret = st.invoke(null, (java.lang.Object) arr);
    1.76 +        assertTrue(ret instanceof java.lang.Object[], "Expecting array: " + ret);
    1.77 +        java.lang.Object[] res = (java.lang.Object[]) ret;
    1.78          assertEquals(res.length, 1, "One element");
    1.79          assertEquals(res[0], "Ahoj", "The right string");
    1.80      }
    1.81 @@ -250,7 +248,7 @@
    1.82     @Test public void checkTheTypeOfThrownException() throws Throwable {
    1.83          FnContext.currentPresenter(null);
    1.84          assertNull(Fn.activePresenter(), "No presenter is activer right now");
    1.85 -        Object res = null;
    1.86 +        java.lang.Object res = null;
    1.87          try {
    1.88              Method st = methodClass.getMethod("plus", int.class, int.class);
    1.89              try {