diff --git a/SWADroid/src/es/ugr/swad/swadroid/Base64.java b/SWADroid/src/es/ugr/swad/swadroid/Base64.java index 71d5a662..850a8ae8 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/Base64.java +++ b/SWADroid/src/es/ugr/swad/swadroid/Base64.java @@ -1360,7 +1360,7 @@ public class Base64 @Override public Class resolveClass(java.io.ObjectStreamClass streamClass) throws java.io.IOException, ClassNotFoundException { - Class c = Class.forName(streamClass.getName(), false, loader); + Class c = Class.forName(streamClass.getName(), false, loader); if( c == null ){ return super.resolveClass(streamClass); } else { diff --git a/SWADroid/src/es/ugr/swad/swadroid/ImageExpandableListAdapter.java b/SWADroid/src/es/ugr/swad/swadroid/ImageExpandableListAdapter.java index cdf83782..c99a26db 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/ImageExpandableListAdapter.java +++ b/SWADroid/src/es/ugr/swad/swadroid/ImageExpandableListAdapter.java @@ -55,6 +55,7 @@ public class ImageExpandableListAdapter extends SimpleExpandableListAdapter { /* (non-Javadoc) * @see android.widget.SimpleExpandableListAdapter#getGroupView(int, boolean, android.view.View, android.view.ViewGroup) */ + @SuppressWarnings("unchecked") @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { @@ -68,6 +69,7 @@ public class ImageExpandableListAdapter extends SimpleExpandableListAdapter { return v; } + @SuppressWarnings("unchecked") @Override public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { final View v = super.getChildView(groupPosition, childPosition, isLastChild, convertView, parent); diff --git a/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java b/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java index 60f187ec..cf1397b8 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java +++ b/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java @@ -166,6 +166,7 @@ public class SWADMain extends ExpandableListActivity { int groupPosition, int childPosition, long id) { // Get the item that was clicked Object o = this.getExpandableListAdapter().getChild(groupPosition, childPosition); + @SuppressWarnings("unchecked") String keyword = (String) ((Map)o).get(NAME); Intent activity; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/Course.java b/SWADroid/src/es/ugr/swad/swadroid/model/Course.java index 1b1eb23d..ff428f7c 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/Course.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/Course.java @@ -33,7 +33,8 @@ public class Course extends Model { private String name; private static PropertyInfo PI_id = new PropertyInfo(); private static PropertyInfo PI_name = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_id, PI_name @@ -108,7 +109,7 @@ public class Course extends Model { /* (non-Javadoc) * @see org.ksoap2.serialization.KvmSerializable#getPropertyInfo(int, java.util.Hashtable, org.ksoap2.serialization.PropertyInfo) */ - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.LONG_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/DataBaseHelper.java b/SWADroid/src/es/ugr/swad/swadroid/model/DataBaseHelper.java index beb857b8..f30f3ec0 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/DataBaseHelper.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/DataBaseHelper.java @@ -89,6 +89,7 @@ public class DataBaseHelper { * @param ent Cursor to the table rows * @return A Model's subclass object */ + @SuppressWarnings("rawtypes") private Model createObjectByTable(String table, Entity ent) { Model o = null; Pair params; @@ -552,7 +553,7 @@ public class DataBaseHelper { * Removes a PairTable from database * @param p PairTable to be removed */ - public void removePairTable(PairTable p) + public void removePairTable(@SuppressWarnings("rawtypes") PairTable p) { String table = p.getTable(); Integer first = (Integer) p.getFirst(); diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/Notification.java b/SWADroid/src/es/ugr/swad/swadroid/model/Notification.java index fa28bd30..7ac22819 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/Notification.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/Notification.java @@ -73,7 +73,8 @@ public class Notification extends Model { private static PropertyInfo PI_summary = new PropertyInfo(); private static PropertyInfo PI_status = new PropertyInfo(); private static PropertyInfo PI_content = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_id, PI_eventType, @@ -326,7 +327,7 @@ public class Notification extends Model { /* (non-Javadoc) * @see org.ksoap2.serialization.KvmSerializable#getPropertyInfo(int, java.util.Hashtable, org.ksoap2.serialization.PropertyInfo) */ - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.LONG_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/PairTable.java b/SWADroid/src/es/ugr/swad/swadroid/model/PairTable.java index ba6f844e..55e78eae 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/PairTable.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/PairTable.java @@ -134,7 +134,7 @@ public class PairTable extends Model { return 0; } - public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) { + public void getPropertyInfo(int arg0, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo arg2) { // TODO Auto-generated method stub } diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/Test.java b/SWADroid/src/es/ugr/swad/swadroid/model/Test.java index ad8372f5..fdbab11f 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/Test.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/Test.java @@ -74,7 +74,8 @@ public class Test extends Model { private static PropertyInfo PI_def = new PropertyInfo(); private static PropertyInfo PI_max = new PropertyInfo(); private static PropertyInfo PI_feedback = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_min, PI_def, @@ -532,7 +533,7 @@ public class Test extends Model { /* (non-Javadoc) * @see org.ksoap2.serialization.KvmSerializable#getPropertyInfo(int, java.util.Hashtable, org.ksoap2.serialization.PropertyInfo) */ - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.INTEGER_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/TestAnswer.java b/SWADroid/src/es/ugr/swad/swadroid/model/TestAnswer.java index b72721de..5c73b2cc 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/TestAnswer.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/TestAnswer.java @@ -56,7 +56,8 @@ public class TestAnswer extends Model { private static PropertyInfo PI_correctAnswered = new PropertyInfo(); private static PropertyInfo PI_answer = new PropertyInfo(); private static PropertyInfo PI_ansInd = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_id, PI_correct, @@ -257,7 +258,7 @@ public class TestAnswer extends Model { /* (non-Javadoc) * @see org.ksoap2.serialization.KvmSerializable#getPropertyInfo(int, java.util.Hashtable, org.ksoap2.serialization.PropertyInfo) */ - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.LONG_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/TestQuestion.java b/SWADroid/src/es/ugr/swad/swadroid/model/TestQuestion.java index c0596ef4..d21cf9fc 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/TestQuestion.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/TestQuestion.java @@ -58,7 +58,8 @@ public class TestQuestion extends Model { private static PropertyInfo PI_editTime = new PropertyInfo(); private static PropertyInfo PI_ansType = new PropertyInfo(); private static PropertyInfo PI_shuffle = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_id, PI_stem, @@ -269,7 +270,7 @@ public class TestQuestion extends Model { /* (non-Javadoc) * @see org.ksoap2.serialization.KvmSerializable#getPropertyInfo(int, java.util.Hashtable, org.ksoap2.serialization.PropertyInfo) */ - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.LONG_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/TestTag.java b/SWADroid/src/es/ugr/swad/swadroid/model/TestTag.java index 7cb5951b..337c0caf 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/TestTag.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/TestTag.java @@ -42,7 +42,8 @@ public class TestTag extends Model { private static PropertyInfo PI_id = new PropertyInfo(); private static PropertyInfo PI_tagText = new PropertyInfo(); private static PropertyInfo PI_tagInd = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_id, PI_tagText, @@ -184,7 +185,7 @@ public class TestTag extends Model { /* (non-Javadoc) * @see org.ksoap2.serialization.KvmSerializable#getPropertyInfo(int, java.util.Hashtable, org.ksoap2.serialization.PropertyInfo) */ - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.LONG_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/model/User.java b/SWADroid/src/es/ugr/swad/swadroid/model/User.java index b455d7a7..19a29c96 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/model/User.java +++ b/SWADroid/src/es/ugr/swad/swadroid/model/User.java @@ -69,7 +69,8 @@ public class User implements KvmSerializable { private static PropertyInfo PI_userSurname2 = new PropertyInfo(); private static PropertyInfo PI_userFirstName = new PropertyInfo(); private static PropertyInfo PI_userTypeName = new PropertyInfo(); - private static PropertyInfo[] PI_PROP_ARRAY = + @SuppressWarnings("unused") + private static PropertyInfo[] PI_PROP_ARRAY = { PI_userCode, PI_userTypeCode, @@ -258,7 +259,7 @@ public class User implements KvmSerializable { return 8; } - public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo) { + public void getPropertyInfo(int param, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo propertyInfo) { switch(param){ case 0: propertyInfo.type = PropertyInfo.STRING_CLASS; diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/Courses.java b/SWADroid/src/es/ugr/swad/swadroid/modules/Courses.java index 38375924..8f874bf0 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/Courses.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/Courses.java @@ -117,7 +117,8 @@ public class Courses extends Module { List coursesSWAD = new ArrayList(); List newCourses = new ArrayList(); List obsoleteCourses = new ArrayList(); - Vector res = (Vector) result; + @SuppressWarnings("rawtypes") + Vector res = (Vector) result; SoapObject soap = (SoapObject) res.get(1); int csSize = soap.getPropertyCount(); for (int i = 0; i < csSize; i++) { diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/Module.java b/SWADroid/src/es/ugr/swad/swadroid/modules/Module.java index d2e902a4..4dcff968 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/Module.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/Module.java @@ -266,6 +266,7 @@ public abstract class Module extends Activity { /* (non-Javadoc) * @see android.app.Activity#onCreate() */ + @SuppressWarnings("static-access") @Override protected void onCreate(Bundle savedInstanceState) { //Check if debug mode is enabled @@ -406,7 +407,7 @@ public abstract class Module extends Activity { * @throws IllegalAccessException * @throws XmlPullParserException */ - protected void sendRequest(Class cl, boolean simple) + protected void sendRequest(@SuppressWarnings("rawtypes") Class cl, boolean simple) throws IOException, SoapFault, IllegalAccessException, InstantiationException, XmlPullParserException { /** diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java b/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java index 9cc301aa..fa67c630 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java @@ -193,7 +193,8 @@ public class Notifications extends Module { if (result != null) { //Stores notifications data returned by webservice response - Vector res = (Vector) result; + @SuppressWarnings("rawtypes") + Vector res = (Vector) result; SoapObject soap = (SoapObject) res.get(1); int csSize = soap.getPropertyCount(); for (int i = 0; i < csSize; i++) { diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/tests/CheckedAnswersArrayAdapter.java b/SWADroid/src/es/ugr/swad/swadroid/modules/tests/CheckedAnswersArrayAdapter.java index 015305de..2dad08e1 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/tests/CheckedAnswersArrayAdapter.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/tests/CheckedAnswersArrayAdapter.java @@ -25,7 +25,6 @@ import es.ugr.swad.swadroid.model.TestAnswer; import android.content.Context; import android.graphics.Color; import android.text.Html; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsConfigDownload.java b/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsConfigDownload.java index c22db27d..e6283b15 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsConfigDownload.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsConfigDownload.java @@ -195,7 +195,8 @@ public class TestsConfigDownload extends Module { if (result != null) { //Stores tests data returned by webservice response - Vector res = (Vector) result; + @SuppressWarnings("rawtypes") + Vector res = (Vector) result; Integer pluggable = new Integer(res.get(0).toString()); isPluggable = Global.parseIntBool(pluggable); diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsQuestionsDownload.java b/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsQuestionsDownload.java index 4445f408..7b16fe85 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsQuestionsDownload.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/tests/TestsQuestionsDownload.java @@ -97,7 +97,8 @@ public class TestsQuestionsDownload extends Module { if (result != null) { //Stores tests data returned by webservice response - Vector res = (Vector) result; + @SuppressWarnings("rawtypes") + Vector res = (Vector) result; SoapObject tagsListObject = (SoapObject)res.get(0); SoapObject questionsListObject = (SoapObject)res.get(1); diff --git a/SWADroid/src/es/ugr/swad/swadroid/widget/NumberPicker.java b/SWADroid/src/es/ugr/swad/swadroid/widget/NumberPicker.java index e0869d2c..a916a264 100755 --- a/SWADroid/src/es/ugr/swad/swadroid/widget/NumberPicker.java +++ b/SWADroid/src/es/ugr/swad/swadroid/widget/NumberPicker.java @@ -23,7 +23,6 @@ import android.text.InputType; import android.text.Spanned; import android.text.method.NumberKeyListener; import android.util.AttributeSet; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; @@ -46,7 +45,8 @@ import es.ugr.swad.swadroid.R; public class NumberPicker extends LinearLayout implements OnClickListener, OnFocusChangeListener, OnLongClickListener { - private static final String TAG = "NumberPicker"; + @SuppressWarnings("unused") + private static final String TAG = "NumberPicker"; private static final int DEFAULT_MAX = 200; private static final int DEFAULT_MIN = 0; @@ -113,7 +113,6 @@ public class NumberPicker extends LinearLayout implements OnClickListener, this(context, attrs, 0); } - @SuppressWarnings({"UnusedDeclaration"}) public NumberPicker(Context context, AttributeSet attrs, int defStyle) { super(context, attrs); setOrientation(VERTICAL);