Remove unnecessary boxing/unboxing
This commit is contained in:
parent
ca60148431
commit
dad7d53f43
8 changed files with 11 additions and 11 deletions
|
@ -465,7 +465,7 @@ public class BinaryInspector {
|
||||||
int size = index.preloadStreets(c, null);
|
int size = index.preloadStreets(c, null);
|
||||||
List<Street> streets = new ArrayList<Street>(c.getStreets());
|
List<Street> streets = new ArrayList<Street>(c.getStreets());
|
||||||
print(MessageFormat.format("\t\t''{0}'' [{1,number,#}], {2,number,#} street(s) size {3,number,#} bytes",
|
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)
|
if(!verbose.vstreets)
|
||||||
{
|
{
|
||||||
println("");
|
println("");
|
||||||
|
@ -483,7 +483,7 @@ public class BinaryInspector {
|
||||||
final List<Street> intersections = t.getIntersectedStreets();
|
final List<Street> intersections = t.getIntersectedStreets();
|
||||||
|
|
||||||
println(MessageFormat.format("\t\t\t''{0}'' [{1,number,#}], {2,number,#} building(s), {3,number,#} intersections(s)",
|
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) {
|
if (buildings != null && !buildings.isEmpty() && verbose.vbuildings) {
|
||||||
println("\t\t\t\tBuildings:");
|
println("\t\t\t\tBuildings:");
|
||||||
|
|
|
@ -374,7 +374,7 @@ public class OsmAndLocationProvider implements SensorEventListener {
|
||||||
private void updateCompassVal() {
|
private void updateCompassVal() {
|
||||||
heading = (float) getAngle(avgValSin, avgValCos);
|
heading = (float) getAngle(avgValSin, avgValCos);
|
||||||
for(OsmAndCompassListener c : compassListeners){
|
for(OsmAndCompassListener c : compassListeners){
|
||||||
c.updateCompassValue(heading.floatValue());
|
c.updateCompassValue(heading);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -741,7 +741,7 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity {
|
||||||
public void openSelectionMode(int stringRes, int darkIcon, int lightIcon, DialogInterface.OnClickListener listener, Boolean backup,
|
public void openSelectionMode(int stringRes, int darkIcon, int lightIcon, DialogInterface.OnClickListener listener, Boolean backup,
|
||||||
LocalIndexType filter) {
|
LocalIndexType filter) {
|
||||||
if (backup != null) {
|
if (backup != null) {
|
||||||
listAdapter.filterCategories(backup.booleanValue());
|
listAdapter.filterCategories(backup);
|
||||||
}
|
}
|
||||||
if (filter != null) {
|
if (filter != null) {
|
||||||
listAdapter.filterCategories(filter);
|
listAdapter.filterCategories(filter);
|
||||||
|
|
|
@ -226,7 +226,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
String id = preference.getKey();
|
String id = preference.getKey();
|
||||||
super.onPreferenceChange(preference, newValue);
|
super.onPreferenceChange(preference, newValue);
|
||||||
if (id.equals(settings.SAFE_MODE.getId())) {
|
if (id.equals(settings.SAFE_MODE.getId())) {
|
||||||
if (((Boolean) newValue).booleanValue()) {
|
if ((Boolean) newValue) {
|
||||||
loadNativeLibrary();
|
loadNativeLibrary();
|
||||||
}
|
}
|
||||||
} else if (preference == applicationDir) {
|
} else if (preference == applicationDir) {
|
||||||
|
|
|
@ -247,8 +247,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
Constructor c = exClass.getConstructor(new Class[] { String.class });
|
Constructor c = exClass.getConstructor(new Class[] { String.class });
|
||||||
Object exInstance = c.newInstance(file.getAbsolutePath());
|
Object exInstance = c.newInstance(file.getAbsolutePath());
|
||||||
Method getAttributeInt = exClass.getMethod("getAttributeInt", new Class[] { String.class, Integer.TYPE });
|
Method getAttributeInt = exClass.getMethod("getAttributeInt", new Class[] { String.class, Integer.TYPE });
|
||||||
Integer it = (Integer) getAttributeInt.invoke(exInstance, "Orientation", new Integer(1));
|
Integer it = (Integer) getAttributeInt.invoke(exInstance, "Orientation", 1);
|
||||||
orientation = it.intValue();
|
orientation = it;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
log.error(e);
|
log.error(e);
|
||||||
|
|
|
@ -347,7 +347,7 @@ public class LocalOpenstreetmapActivity extends OsmandListActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Integer.valueOf(uploaded);
|
return uploaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -370,7 +370,7 @@ public class LocalOpenstreetmapActivity extends OsmandListActivity {
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
AccessibleToast.makeText(LocalOpenstreetmapActivity.this,
|
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();
|
.show();
|
||||||
}
|
}
|
||||||
removeDialog(DIALOG_PROGRESS_UPLOAD);
|
removeDialog(DIALOG_PROGRESS_UPLOAD);
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class HillshadeLayer extends MapTileLayer {
|
||||||
String filename = cursor.getString(0);
|
String filename = cursor.getString(0);
|
||||||
long lastModified = cursor.getLong(1);
|
long lastModified = cursor.getLong(1);
|
||||||
Long read = fileModified.get(filename);
|
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 left = cursor.getInt(2);
|
||||||
int right = cursor.getInt(3);
|
int right = cursor.getInt(3);
|
||||||
int top = cursor.getInt(4);
|
int top = cursor.getInt(4);
|
||||||
|
|
|
@ -363,7 +363,7 @@ public class MapWidgetRegistry {
|
||||||
if(preference != null) {
|
if(preference != null) {
|
||||||
Object value = preference.getModeValue(mode);
|
Object value = preference.getModeValue(mode);
|
||||||
if(value instanceof Boolean) {
|
if(value instanceof Boolean) {
|
||||||
return ((Boolean) value).booleanValue();
|
return (Boolean) value;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue