Merge pull request #492 from naoliv/pull18

Remove unnecessary boxing/unboxing
This commit is contained in:
vshcherb 2013-08-05 10:48:58 -07:00
commit 568ebb9c63
8 changed files with 11 additions and 11 deletions

View file

@ -465,7 +465,7 @@ public class BinaryInspector {
int size = index.preloadStreets(c, null);
List<Street> streets = new ArrayList<Street>(c.getStreets());
print(MessageFormat.format("\t\t''{0}'' [{1,number,#}], {2,number,#} street(s) size {3,number,#} bytes",
new Object[]{c.getEnName(), c.getId(), Integer.valueOf(streets.size()), Integer.valueOf(size)}));
new Object[]{c.getEnName(), c.getId(), streets.size(), size}));
if(!verbose.vstreets)
{
println("");
@ -483,7 +483,7 @@ public class BinaryInspector {
final List<Street> intersections = t.getIntersectedStreets();
println(MessageFormat.format("\t\t\t''{0}'' [{1,number,#}], {2,number,#} building(s), {3,number,#} intersections(s)",
new Object[]{t.getEnName(), t.getId(), Integer.valueOf(buildings.size()), Integer.valueOf(intersections.size())}));
new Object[]{t.getEnName(), t.getId(), buildings.size(), intersections.size()}));
if (buildings != null && !buildings.isEmpty() && verbose.vbuildings) {
println("\t\t\t\tBuildings:");

View file

@ -374,7 +374,7 @@ public class OsmAndLocationProvider implements SensorEventListener {
private void updateCompassVal() {
heading = (float) getAngle(avgValSin, avgValCos);
for(OsmAndCompassListener c : compassListeners){
c.updateCompassValue(heading.floatValue());
c.updateCompassValue(heading);
}
}

View file

@ -741,7 +741,7 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity {
public void openSelectionMode(int stringRes, int darkIcon, int lightIcon, DialogInterface.OnClickListener listener, Boolean backup,
LocalIndexType filter) {
if (backup != null) {
listAdapter.filterCategories(backup.booleanValue());
listAdapter.filterCategories(backup);
}
if (filter != null) {
listAdapter.filterCategories(filter);

View file

@ -241,7 +241,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
String id = preference.getKey();
super.onPreferenceChange(preference, newValue);
if (id.equals(settings.SAFE_MODE.getId())) {
if (((Boolean) newValue).booleanValue()) {
if ((Boolean) newValue) {
loadNativeLibrary();
}
} else if (preference == applicationDir) {

View file

@ -247,8 +247,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
Constructor c = exClass.getConstructor(new Class[] { String.class });
Object exInstance = c.newInstance(file.getAbsolutePath());
Method getAttributeInt = exClass.getMethod("getAttributeInt", new Class[] { String.class, Integer.TYPE });
Integer it = (Integer) getAttributeInt.invoke(exInstance, "Orientation", new Integer(1));
orientation = it.intValue();
Integer it = (Integer) getAttributeInt.invoke(exInstance, "Orientation", 1);
orientation = it;
} catch (Exception e) {
e.printStackTrace();
log.error(e);

View file

@ -347,7 +347,7 @@ public class LocalOpenstreetmapActivity extends OsmandListActivity {
}
}
return Integer.valueOf(uploaded);
return uploaded;
}
@Override
@ -370,7 +370,7 @@ public class LocalOpenstreetmapActivity extends OsmandListActivity {
listAdapter.notifyDataSetChanged();
if (result != null) {
AccessibleToast.makeText(LocalOpenstreetmapActivity.this,
MessageFormat.format(getString(R.string.local_openstreetmap_were_uploaded), result.intValue()), Toast.LENGTH_LONG)
MessageFormat.format(getString(R.string.local_openstreetmap_were_uploaded), result), Toast.LENGTH_LONG)
.show();
}
removeDialog(DIALOG_PROGRESS_UPLOAD);

View file

@ -95,7 +95,7 @@ public class HillshadeLayer extends MapTileLayer {
String filename = cursor.getString(0);
long lastModified = cursor.getLong(1);
Long read = fileModified.get(filename);
if(rs.containsKey(filename) && read != null && lastModified == read.longValue()) {
if(rs.containsKey(filename) && read != null && lastModified == read) {
int left = cursor.getInt(2);
int right = cursor.getInt(3);
int top = cursor.getInt(4);

View file

@ -354,7 +354,7 @@ public class MapWidgetRegistry {
if(preference != null) {
Object value = preference.getModeValue(mode);
if(value instanceof Boolean) {
return ((Boolean) value).booleanValue();
return (Boolean) value;
}
return true;
}