Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d6ff93e authored by Orion Hodson's avatar Orion Hodson Committed by Automerger Merge Worker
Browse files

Merge "Prefer valueOf() to boxed primitive constructors" am: 773627cf am:...

Merge "Prefer valueOf() to boxed primitive constructors" am: 773627cf am: 2488ef52 am: f43a706e am: 53e69c7e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216444



Change-Id: I91f8849596f8dc62be4dcf49d46cac41fdee4e80
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5999bc26 53e69c7e
Loading
Loading
Loading
Loading
+25 −25
Original line number Diff line number Diff line
@@ -268,22 +268,22 @@ public class TypedProperties extends HashMap<String, Object> {
                    if (value < Byte.MIN_VALUE || value > Byte.MAX_VALUE) {
                        throw new ParseException(st, "8-bit integer constant");
                    }
                return new Byte((byte)value);
                    return Byte.valueOf((byte) value);
                case 2:
                    if (value < Short.MIN_VALUE || value > Short.MAX_VALUE) {
                        throw new ParseException(st, "16-bit integer constant");
                    }
                return new Short((short)value);
                    return Short.valueOf((short) value);
                case 4:
                    if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {
                        throw new ParseException(st, "32-bit integer constant");
                    }
                return new Integer((int)value);
                    return Integer.valueOf((int) value);
                case 8:
                    if (value < Long.MIN_VALUE || value > Long.MAX_VALUE) {
                        throw new ParseException(st, "64-bit integer constant");
                    }
                return new Long(value);
                    return Long.valueOf(value);
                default:
                    throw new IllegalStateException(
                            "Internal error; unexpected integer type width " + width);
@@ -317,10 +317,10 @@ public class TypedProperties extends HashMap<String, Object> {
                        throw new ParseException(st, "32-bit float constant");
                    }
                }
                return new Float((float)value);
                return Float.valueOf((float) value);
            } else {
                // This property is a double; no need to truncate.
                return new Double(value);
                return Double.valueOf(value);
            }
        } else if (type == TYPE_STRING) {
            // Expect a quoted string or the word "null".