Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ ConfigDirective parseDirective(String configfile, int lineno, String line) throw
name = "";
}
throw new MissingDirectiveParameterException(configfile, lineno,
"Directive '#%s' needs an argument (%s) at line %d of %s", name.toLowerCase(Locale.US),
"Directive '#%s' needs an argument (%s) at line %d of %s", name.toLowerCase(Locale.ENGLISH),
"include".equalsIgnoreCase(name) ? "filename" : "/path/to/executable", lineno, configfile);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private static String mapToAsterisk(Method getter) {
// ok, no field
}

return fieldName.toLowerCase(Locale.US);
return fieldName.toLowerCase(Locale.ENGLISH);
}

static String determineSetterName(String getterName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public final void registerEventClass(String eventType, Class<? extends ManagerEv
throw new IllegalArgumentException(clazz + " has no usable constructor");
}

registeredEventClasses.put(eventType.toLowerCase(Locale.US), clazz);
registeredEventClasses.put(eventType.toLowerCase(Locale.ENGLISH), clazz);

logger.debug("Registered event type '" + eventType + "' (" + clazz + ")");
}
Expand Down Expand Up @@ -167,7 +167,7 @@ public ManagerEvent buildEvent(Object source, Map<String, Object> attributes) {
return null;
}

eventType = ((String) attributes.get("event")).toLowerCase(Locale.US);
eventType = ((String) attributes.get("event")).toLowerCase(Locale.ENGLISH);

// Change in Asterisk 1.4 where the name of the UserEvent is sent as
// property instead
Expand All @@ -184,7 +184,7 @@ public ManagerEvent buildEvent(Object source, Map<String, Object> attributes) {
return null;
}

userEventType = ((String) attributes.get("userevent")).toLowerCase(Locale.US);
userEventType = ((String) attributes.get("userevent")).toLowerCase(Locale.ENGLISH);
eventType = eventType + userEventType;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Map<Integer, String> getCategories() {
Map<String, Object> responseMap = super.getAttributes();
for (Entry<String, Object> response : responseMap.entrySet()) {
String key = response.getKey();
if (key.toLowerCase(Locale.US).contains("category")) {
if (key.toLowerCase(Locale.ENGLISH).contains("category")) {
String[] keyParts = key.split("-");

// if it doesn't have at least category-XXXXXX, skip
Expand Down Expand Up @@ -91,7 +91,7 @@ public Map<Integer, String> getLines(int categoryNumber) {
Map<String, Object> responseMap = super.getAttributes();
for (Entry<String, Object> response : responseMap.entrySet()) {
String key = response.getKey();
if (key.toLowerCase(Locale.US).contains("line")) {
if (key.toLowerCase(Locale.ENGLISH).contains("line")) {
String[] keyParts = key.split("-");

// if it doesn't have at least line-XXXXXX-XXXXXX, skip
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/asteriskjava/util/AstUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static boolean isTrue(Object o) {
return (Boolean) o;
}

return TRUE_LITERALS.contains(o.toString().toLowerCase(Locale.US));
return TRUE_LITERALS.contains(o.toString().toLowerCase(Locale.ENGLISH));
}

/**
Expand Down Expand Up @@ -180,7 +180,7 @@ public static boolean isNull(Object s) {
return false;
}

return NULL_LITERALS.contains(((String) s).toLowerCase(Locale.US));
return NULL_LITERALS.contains(((String) s).toLowerCase(Locale.ENGLISH));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/asteriskjava/util/ReflectionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private static Map<String, Method> getSettersInternal(Class<?> clazz) {
}

// OK seems to be an setter
name = methodName.substring("set".length()).toLowerCase(Locale.US);
name = methodName.substring("set".length()).toLowerCase(Locale.ENGLISH);

// if an event class implements a setter that exists in
// ManagerEvent, then prefer the setter from the extending class
Expand Down