Skip to content

Commit

Permalink
Visibility housekeeping: reduce to least access level.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Dec 22, 2015
1 parent c7090c9 commit bd556bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions retrofit/src/main/java/retrofit2/RequestBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void addPathParam(String name, String value, boolean encoded) {
relativeUrl = relativeUrl.replace("{" + name + "}", canonicalize(value, encoded));
}

static String canonicalize(String input, boolean alreadyEncoded) {
private static String canonicalize(String input, boolean alreadyEncoded) {
int codePoint;
for (int i = 0, limit = input.length(); i < limit; i += Character.charCount(codePoint)) {
codePoint = input.codePointAt(i);
Expand All @@ -107,7 +107,8 @@ static String canonicalize(String input, boolean alreadyEncoded) {
return input;
}

static void canonicalize(Buffer out, String input, int pos, int limit, boolean alreadyEncoded) {
private static void canonicalize(Buffer out, String input, int pos, int limit,
boolean alreadyEncoded) {
Buffer utf8Buffer = null; // Lazily allocated.
int codePoint;
for (int i = pos; i < limit; i += Character.charCount(codePoint)) {
Expand Down
2 changes: 1 addition & 1 deletion retrofit/src/main/java/retrofit2/RequestFactoryParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static Set<String> parsePathParameters(String path) {
return patterns;
}

static Class<?> boxIfPrimitive(Class<?> type) {
private static Class<?> boxIfPrimitive(Class<?> type) {
if (boolean.class == type) return Boolean.class;
if (byte.class == type) return Byte.class;
if (char.class == type) return Character.class;
Expand Down
6 changes: 3 additions & 3 deletions retrofit/src/main/java/retrofit2/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static <T> void validateServiceInterface(Class<T> service) {
}
}

public static Type getParameterUpperBound(int index, ParameterizedType type) {
static Type getParameterUpperBound(int index, ParameterizedType type) {
Type[] types = type.getActualTypeArguments();
if (types.length <= index) {
throw new IllegalArgumentException(
Expand All @@ -102,7 +102,7 @@ public static Type getParameterUpperBound(int index, ParameterizedType type) {
return paramType;
}

public static boolean hasUnresolvableType(Type type) {
static boolean hasUnresolvableType(Type type) {
if (type instanceof Class<?>) {
return false;
}
Expand Down Expand Up @@ -130,7 +130,7 @@ public static boolean hasUnresolvableType(Type type) {
}

// This method is copyright 2008 Google Inc. and is taken from Gson under the Apache 2.0 license.
public static Class<?> getRawType(Type type) {
static Class<?> getRawType(Type type) {
if (type instanceof Class<?>) {
// Type is a normal class.
return (Class<?>) type;
Expand Down

0 comments on commit bd556bd

Please sign in to comment.