Use the original java test code

This commit is contained in:
Ben Jackson 2020-07-12 13:57:18 +01:00
commit b3c86bc757
3 changed files with 21 additions and 12 deletions

View file

@ -1,8 +1,11 @@
package com.vimspector.test;
class Base {
public class Base
{
public String DoSomething()
{
return "";
String s = new String();
s.replace( "A", "B" );
return s;
}
}

View file

@ -24,16 +24,6 @@ public class TestApplication {
}
}
private static class TestGeneric<T extends Base > {
T t;
public TestGeneric( T t ) {
this.t = t;
}
public void DoSomethingUseful() {
System.out.println( t.DoSomething() );
}
}
private static <T extends Base> void DoGeneric( T b ) {
TestGeneric<T> foo = new TestGeneric<>( b );
foo.DoSomethingUseful();

View file

@ -0,0 +1,16 @@
package com.vimspector.test;
class TestGeneric<T extends Base> {
T base;
public TestGeneric( T b )
{
this.base = b;
}
public String DoSomethingUseful() {
String s = "A B C" + base.DoSomething();
return s.replace( "B", "C" );
}
}