diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 15:40:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | b65017a2a7af290f6681da7b197a52efe83d5185 (patch) | |
tree | 06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/runner/complexlib | |
parent | 33ec740d1438c3dddf8e1974757ed05bb76425ca (diff) |
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/runner/complexlib')
-rw-r--r-- | qadevOOo/runner/complexlib/Assurance.java | 14 | ||||
-rw-r--r-- | qadevOOo/runner/complexlib/ShowTargets.java | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java index a980f12bb4ae..2fa05585e907 100644 --- a/qadevOOo/runner/complexlib/Assurance.java +++ b/qadevOOo/runner/complexlib/Assurance.java @@ -260,9 +260,9 @@ public class Assurance * it means that <em>no</em> exception must be throw by invoking the method. */ protected void assureException( final String _message, final Object _object, final String _methodName, - final Class[] _argClasses, final Object[] _methodArgs, final Class _expectedExceptionClass ) + final Class<?>[] _argClasses, final Object[] _methodArgs, final Class<?> _expectedExceptionClass ) { - Class objectClass = _object.getClass(); + Class<?> objectClass = _object.getClass(); boolean noExceptionAllowed = ( _expectedExceptionClass == null ); @@ -296,9 +296,9 @@ public class Assurance * it means that <em>no</em> exception must be throw by invoking the method. */ protected void assureException( final String _message, final Object _object, final String _methodName, - final Object[] _methodArgs, final Class _expectedExceptionClass ) + final Object[] _methodArgs, final Class<?> _expectedExceptionClass ) { - Class[] argClasses = new Class[ _methodArgs.length ]; + Class<?>[] argClasses = new Class[ _methodArgs.length ]; for ( int i=0; i<_methodArgs.length; ++i ) argClasses[i] = _methodArgs[i].getClass(); assureException( _message, _object, _methodName, argClasses, _methodArgs, _expectedExceptionClass ); @@ -313,7 +313,7 @@ public class Assurance * it means that <em>no</em> exception must be throw by invoking the method. */ protected void assureException( final Object _object, final String _methodName, final Object[] _methodArgs, - final Class _expectedExceptionClass ) + final Class<?> _expectedExceptionClass ) { assureException( "did not catch the expected exception (" + @@ -330,8 +330,8 @@ public class Assurance * @param _expectedExceptionClass is the class of the exception to be caught. If this is null, * it means that <em>no</em> exception must be throw by invoking the method. */ - protected void assureException( final Object _object, final String _methodName, final Class[] _argClasses, - final Object[] _methodArgs, final Class _expectedExceptionClass ) + protected void assureException( final Object _object, final String _methodName, final Class<?>[] _argClasses, + final Object[] _methodArgs, final Class<?> _expectedExceptionClass ) { assureException( "did not catch the expected exception (" + diff --git a/qadevOOo/runner/complexlib/ShowTargets.java b/qadevOOo/runner/complexlib/ShowTargets.java index 335614c0d2e4..3835fc44031d 100644 --- a/qadevOOo/runner/complexlib/ShowTargets.java +++ b/qadevOOo/runner/complexlib/ShowTargets.java @@ -33,8 +33,8 @@ public class ShowTargets public static void main( String[] args ) { - ArrayList targets = new ArrayList(); - ArrayList descs = new ArrayList(); + ArrayList<String> targets = new ArrayList<String>(); + ArrayList<String> descs = new ArrayList<String>(); targets.add( "run" ); descs.add( "runs all complex tests in this module" ); @@ -52,7 +52,7 @@ public class ShowTargets continue; // get the class - Class potentialTestClass = null; + Class<?> potentialTestClass = null; try { potentialTestClass = Class.forName( completePotentialClassName ); } catch( java.lang.ClassNotFoundException e ) { @@ -60,7 +60,7 @@ public class ShowTargets } // see if it is derived from complexlib.ComplexTestCase - Class superClass = potentialTestClass.getSuperclass(); + Class<?> superClass = potentialTestClass.getSuperclass(); while ( superClass != null ) { if ( superClass.getName().equals( "complexlib.ComplexTestCase" ) ) @@ -94,7 +94,7 @@ public class ShowTargets /** determines if the test denoted by a given Class is an interactive test */ - static private boolean isInteractiveTest( Class testClass ) + static private boolean isInteractiveTest( Class<?> testClass ) { java.lang.reflect.Method interactiveTestMethod = null; try { interactiveTestMethod = testClass.getMethod( "isInteractiveTest", new Class[]{} ); } @@ -112,7 +112,7 @@ public class ShowTargets return false; } - static private String getShortTestDescription( Class _testClass ) + static private String getShortTestDescription( Class<?> _testClass ) { java.lang.reflect.Method getShortDescriptionMethod = null; try { getShortDescriptionMethod = _testClass.getMethod( "getShortTestDescription", new Class[]{} ); } |