Java cleanup, remove unnecessary @SuppressWarnings annotations

Change-Id: Ib5df091fc4a6233b526c44ae42dbdbacb0bef7c6
This commit is contained in:
Noel Grandin
2013-05-03 15:20:36 +02:00
parent 402c8f5f1e
commit 8bebd29976
20 changed files with 3 additions and 23 deletions

View File

@@ -188,7 +188,6 @@ public class Map /* extends complexlib.ComplexTestCase */
);
}
@SuppressWarnings("unchecked")
@Test public void testComplexKeyTypes() throws com.sun.star.uno.Exception
{
Type intType = new Type( Integer.class );

View File

@@ -173,7 +173,6 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
};
}
@SuppressWarnings("unchecked")
public void dispose()
{
final EventObject event = new EventObject(this);

View File

@@ -370,7 +370,6 @@ public class RowSet extends TestCase
// --------------------------------------------------------------------------------------------------------
@Test
@SuppressWarnings("unchecked")
public void testRowSetEvents() throws java.lang.Exception
{
System.out.println("testing RowSet Events");

View File

@@ -80,7 +80,6 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
}
// --------------------------------------------------------------------------------------------------------
@SuppressWarnings("unchecked")
private void checkAttributeAccess(String _attributeName, String _attributeValue)
{
System.out.println("setting " + _attributeName + " to " + _attributeValue);

View File

@@ -117,7 +117,6 @@ public abstract class TestCase
* 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.
*/
@SuppressWarnings("unchecked")
protected void assureException( final String _message, final Object _object, final String _methodName,
final Class[] _argClasses, final Object[] _methodArgs, final Class _expectedExceptionClass )
{

View File

@@ -200,7 +200,6 @@ public final class PropertySetMixin {
{@link BoundListeners#notifyListeners} has not yet been called); may only
be null if the attribute that is going to be set is not bound
*/
@SuppressWarnings("unchecked")
public void prepareSet(
String propertyName, Object oldValue, Object newValue,
BoundListeners bound)

View File

@@ -62,7 +62,6 @@ public class _XFastPropertySet extends MultiMethodTest {
/**
* Retrieves relation.
*/
@SuppressWarnings("unchecked")
protected void before() {
exclude = (Set<String>) tEnv.getObjRelation("XFastPropertySet.ExcludeProps") ;
if (exclude == null) {

View File

@@ -76,7 +76,6 @@ public class _XMultiPropertySet extends MultiMethodTest {
/**
* Initializes some fields.
*/
@SuppressWarnings("unchecked")
public void before() {
exclProps = (Set<String>) tEnv.getObjRelation("XMultiPropertySet.ExcludeProps");
if (exclProps == null) exclProps = new HashSet<String>(0);

View File

@@ -76,7 +76,6 @@ public class _XDataInputStream extends MultiMethodTest {
* data of different types and fills the appropriate variables.
* @throws StatusException If one of relations not found.
*/
@SuppressWarnings("unchecked")
public void before(){
XInterface x = (XInterface)tEnv.getObjRelation("StreamWriter") ;

View File

@@ -56,7 +56,6 @@ public class _XDataOutputStream extends MultiMethodTest {
* If relation or data of some type in stream not found then
* tests of corresponding methods are skipped.
*/
@SuppressWarnings("unchecked")
public void before() throws RuntimeException {
List<Object> data = (List<Object>) tEnv.getObjRelation("StreamData") ;

View File

@@ -56,7 +56,6 @@ public class _XOutputStream extends MultiMethodTest {
public void resetStreams();
}
@SuppressWarnings("unchecked")
protected void before() {
checker = (StreamChecker)
tEnv.getObjRelation("XOutputStream.StreamChecker");

View File

@@ -100,7 +100,6 @@ public class _XParameters extends MultiMethodTest {
/**
* Gets object relation
*/
@SuppressWarnings("unchecked")
public void before() {
data = (List<Object>) tEnv.getObjRelation("XParameters.ParamValues") ;
if (data == null) {

View File

@@ -100,7 +100,6 @@ public class _XRow extends MultiMethodTest {
/**
* Retrieves object relation first.
*/
@SuppressWarnings("unchecked")
public void before() {
data = (List<Object>) tEnv.getObjRelation("CurrentRowData") ;
}

View File

@@ -99,7 +99,6 @@ public class _XRowUpdate extends MultiMethodTest {
/**
* Gets relations.
*/
@SuppressWarnings("unchecked")
public void before() {
rowData = (List<Object>) tEnv.getObjRelation("CurrentRowData") ;
if (rowData == null) {

View File

@@ -55,7 +55,6 @@ public class _XMultiSelectionSupplier extends MultiMethodTest {
Object[] selections = null;
Comparator<Object> ObjCompare = null;
@SuppressWarnings("unchecked")
protected void before() {
selections = (Object[])tEnv.getObjRelation("Selections");
if (selections == null) {

View File

@@ -53,7 +53,6 @@ public class _XSelectionSupplier extends MultiMethodTest {
Object[] selections = null;
Comparator<Object> ObjCompare = null;
@SuppressWarnings("unchecked")
protected void before() {
selections = (Object[])tEnv.getObjRelation("Selections");
if (selections == null) {

View File

@@ -275,7 +275,6 @@ public final class WeakMap<K,V> implements Map {
* (Specifically, iterating over the collections returned by those
* methods), as non-modifying methods might modify the underlying map.
**/
@SuppressWarnings("unchecked")
private void cleanUp() {
for (;;) {
Entry<K,V> e = (Entry<K,V>) queue.poll();

View File

@@ -1375,7 +1375,6 @@ public class UndoManager
return new String[] { getCallbackComponentServiceName() };
}
@SuppressWarnings("unchecked")
public void dispose()
{
final EventObject event = new EventObject( this );

View File

@@ -80,7 +80,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
{
m_aControlName = _sName;
}
/** Setter for property m_aButtonSize.
* @param imageSize New value of property m_aButtonSize.
*/
@@ -413,7 +413,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
/** Notifies all registered listeners about the event.
*
*/
@SuppressWarnings("unchecked")
private void fireItemSelected()
{
java.util.ArrayList<XItemListener> list;

View File

@@ -470,7 +470,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
}
/**
*
*
* @param i
* @return the Object in the list model corresponding to the given image index.
*/
@@ -488,7 +488,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
}
/**
*
*
* @param i
* @return the index in the listModel for the given image index.
*/
@@ -561,7 +561,6 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
/** Notifies all registered listeners about the event.
*/
@SuppressWarnings("unchecked")
private void fireItemSelected()
{
java.util.ArrayList<XItemListener> list;