Java cleanup, remove unnecessary @SuppressWarnings annotations
Change-Id: Ib5df091fc4a6233b526c44ae42dbdbacb0bef7c6
This commit is contained in:
@@ -188,7 +188,6 @@ public class Map /* extends complexlib.ComplexTestCase */
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Test public void testComplexKeyTypes() throws com.sun.star.uno.Exception
|
@Test public void testComplexKeyTypes() throws com.sun.star.uno.Exception
|
||||||
{
|
{
|
||||||
Type intType = new Type( Integer.class );
|
Type intType = new Type( Integer.class );
|
||||||
|
@@ -173,7 +173,6 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void dispose()
|
public void dispose()
|
||||||
{
|
{
|
||||||
final EventObject event = new EventObject(this);
|
final EventObject event = new EventObject(this);
|
||||||
|
@@ -370,7 +370,6 @@ public class RowSet extends TestCase
|
|||||||
// --------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void testRowSetEvents() throws java.lang.Exception
|
public void testRowSetEvents() throws java.lang.Exception
|
||||||
{
|
{
|
||||||
System.out.println("testing RowSet Events");
|
System.out.println("testing RowSet Events");
|
||||||
|
@@ -80,7 +80,6 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void checkAttributeAccess(String _attributeName, String _attributeValue)
|
private void checkAttributeAccess(String _attributeName, String _attributeValue)
|
||||||
{
|
{
|
||||||
System.out.println("setting " + _attributeName + " to " + _attributeValue);
|
System.out.println("setting " + _attributeName + " to " + _attributeValue);
|
||||||
|
@@ -117,7 +117,6 @@ public abstract class TestCase
|
|||||||
* is the class of the exception to be caught. If this is null,
|
* 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.
|
* 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,
|
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 )
|
||||||
{
|
{
|
||||||
|
@@ -200,7 +200,6 @@ public final class PropertySetMixin {
|
|||||||
{@link BoundListeners#notifyListeners} has not yet been called); may only
|
{@link BoundListeners#notifyListeners} has not yet been called); may only
|
||||||
be null if the attribute that is going to be set is not bound
|
be null if the attribute that is going to be set is not bound
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void prepareSet(
|
public void prepareSet(
|
||||||
String propertyName, Object oldValue, Object newValue,
|
String propertyName, Object oldValue, Object newValue,
|
||||||
BoundListeners bound)
|
BoundListeners bound)
|
||||||
|
@@ -62,7 +62,6 @@ public class _XFastPropertySet extends MultiMethodTest {
|
|||||||
/**
|
/**
|
||||||
* Retrieves relation.
|
* Retrieves relation.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void before() {
|
protected void before() {
|
||||||
exclude = (Set<String>) tEnv.getObjRelation("XFastPropertySet.ExcludeProps") ;
|
exclude = (Set<String>) tEnv.getObjRelation("XFastPropertySet.ExcludeProps") ;
|
||||||
if (exclude == null) {
|
if (exclude == null) {
|
||||||
|
@@ -76,7 +76,6 @@ public class _XMultiPropertySet extends MultiMethodTest {
|
|||||||
/**
|
/**
|
||||||
* Initializes some fields.
|
* Initializes some fields.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void before() {
|
public void before() {
|
||||||
exclProps = (Set<String>) tEnv.getObjRelation("XMultiPropertySet.ExcludeProps");
|
exclProps = (Set<String>) tEnv.getObjRelation("XMultiPropertySet.ExcludeProps");
|
||||||
if (exclProps == null) exclProps = new HashSet<String>(0);
|
if (exclProps == null) exclProps = new HashSet<String>(0);
|
||||||
|
@@ -76,7 +76,6 @@ public class _XDataInputStream extends MultiMethodTest {
|
|||||||
* data of different types and fills the appropriate variables.
|
* data of different types and fills the appropriate variables.
|
||||||
* @throws StatusException If one of relations not found.
|
* @throws StatusException If one of relations not found.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void before(){
|
public void before(){
|
||||||
|
|
||||||
XInterface x = (XInterface)tEnv.getObjRelation("StreamWriter") ;
|
XInterface x = (XInterface)tEnv.getObjRelation("StreamWriter") ;
|
||||||
|
@@ -56,7 +56,6 @@ public class _XDataOutputStream extends MultiMethodTest {
|
|||||||
* If relation or data of some type in stream not found then
|
* If relation or data of some type in stream not found then
|
||||||
* tests of corresponding methods are skipped.
|
* tests of corresponding methods are skipped.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void before() throws RuntimeException {
|
public void before() throws RuntimeException {
|
||||||
|
|
||||||
List<Object> data = (List<Object>) tEnv.getObjRelation("StreamData") ;
|
List<Object> data = (List<Object>) tEnv.getObjRelation("StreamData") ;
|
||||||
|
@@ -56,7 +56,6 @@ public class _XOutputStream extends MultiMethodTest {
|
|||||||
public void resetStreams();
|
public void resetStreams();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void before() {
|
protected void before() {
|
||||||
checker = (StreamChecker)
|
checker = (StreamChecker)
|
||||||
tEnv.getObjRelation("XOutputStream.StreamChecker");
|
tEnv.getObjRelation("XOutputStream.StreamChecker");
|
||||||
|
@@ -100,7 +100,6 @@ public class _XParameters extends MultiMethodTest {
|
|||||||
/**
|
/**
|
||||||
* Gets object relation
|
* Gets object relation
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void before() {
|
public void before() {
|
||||||
data = (List<Object>) tEnv.getObjRelation("XParameters.ParamValues") ;
|
data = (List<Object>) tEnv.getObjRelation("XParameters.ParamValues") ;
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
|
@@ -100,7 +100,6 @@ public class _XRow extends MultiMethodTest {
|
|||||||
/**
|
/**
|
||||||
* Retrieves object relation first.
|
* Retrieves object relation first.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void before() {
|
public void before() {
|
||||||
data = (List<Object>) tEnv.getObjRelation("CurrentRowData") ;
|
data = (List<Object>) tEnv.getObjRelation("CurrentRowData") ;
|
||||||
}
|
}
|
||||||
|
@@ -99,7 +99,6 @@ public class _XRowUpdate extends MultiMethodTest {
|
|||||||
/**
|
/**
|
||||||
* Gets relations.
|
* Gets relations.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void before() {
|
public void before() {
|
||||||
rowData = (List<Object>) tEnv.getObjRelation("CurrentRowData") ;
|
rowData = (List<Object>) tEnv.getObjRelation("CurrentRowData") ;
|
||||||
if (rowData == null) {
|
if (rowData == null) {
|
||||||
|
@@ -55,7 +55,6 @@ public class _XMultiSelectionSupplier extends MultiMethodTest {
|
|||||||
Object[] selections = null;
|
Object[] selections = null;
|
||||||
Comparator<Object> ObjCompare = null;
|
Comparator<Object> ObjCompare = null;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void before() {
|
protected void before() {
|
||||||
selections = (Object[])tEnv.getObjRelation("Selections");
|
selections = (Object[])tEnv.getObjRelation("Selections");
|
||||||
if (selections == null) {
|
if (selections == null) {
|
||||||
|
@@ -53,7 +53,6 @@ public class _XSelectionSupplier extends MultiMethodTest {
|
|||||||
Object[] selections = null;
|
Object[] selections = null;
|
||||||
Comparator<Object> ObjCompare = null;
|
Comparator<Object> ObjCompare = null;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void before() {
|
protected void before() {
|
||||||
selections = (Object[])tEnv.getObjRelation("Selections");
|
selections = (Object[])tEnv.getObjRelation("Selections");
|
||||||
if (selections == null) {
|
if (selections == null) {
|
||||||
|
@@ -275,7 +275,6 @@ public final class WeakMap<K,V> implements Map {
|
|||||||
* (Specifically, iterating over the collections returned by those
|
* (Specifically, iterating over the collections returned by those
|
||||||
* methods), as non-modifying methods might modify the underlying map.
|
* methods), as non-modifying methods might modify the underlying map.
|
||||||
**/
|
**/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void cleanUp() {
|
private void cleanUp() {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Entry<K,V> e = (Entry<K,V>) queue.poll();
|
Entry<K,V> e = (Entry<K,V>) queue.poll();
|
||||||
|
@@ -1375,7 +1375,6 @@ public class UndoManager
|
|||||||
return new String[] { getCallbackComponentServiceName() };
|
return new String[] { getCallbackComponentServiceName() };
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void dispose()
|
public void dispose()
|
||||||
{
|
{
|
||||||
final EventObject event = new EventObject( this );
|
final EventObject event = new EventObject( this );
|
||||||
|
@@ -80,7 +80,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
|
|||||||
{
|
{
|
||||||
m_aControlName = _sName;
|
m_aControlName = _sName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Setter for property m_aButtonSize.
|
/** Setter for property m_aButtonSize.
|
||||||
* @param imageSize New value of 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.
|
/** Notifies all registered listeners about the event.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void fireItemSelected()
|
private void fireItemSelected()
|
||||||
{
|
{
|
||||||
java.util.ArrayList<XItemListener> list;
|
java.util.ArrayList<XItemListener> list;
|
||||||
|
@@ -470,7 +470,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param i
|
* @param i
|
||||||
* @return the Object in the list model corresponding to the given image index.
|
* @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
|
* @param i
|
||||||
* @return the index in the listModel for the given image index.
|
* @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.
|
/** Notifies all registered listeners about the event.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void fireItemSelected()
|
private void fireItemSelected()
|
||||||
{
|
{
|
||||||
java.util.ArrayList<XItemListener> list;
|
java.util.ArrayList<XItemListener> list;
|
||||||
|
Reference in New Issue
Block a user