Skip to content

Instantly share code, notes, and snippets.

@mnort9
mnort9 / NullEmptyStringDemo.java
Last active November 19, 2015 04:10 — forked from coreyjv/NullEmptyStringDemo.java
Handling empty and nil Strings in Swift compared to Java
public class NullEmptyStringDemo {
public static void main(String[] args) {
ApiClient apiClient = new ApiClient();
// throws IllegalArgumentException, but note that we don't have to catch it
apiClient.getItemAsync("", "");
}
public static class ApiClient {
// Simulate a similar call in ApiClient