Skip to content

Instantly share code, notes, and snippets.

@anton-rudeshko
Created November 21, 2012 12:49
Show Gist options
  • Save anton-rudeshko/4124699 to your computer and use it in GitHub Desktop.
Save anton-rudeshko/4124699 to your computer and use it in GitHub Desktop.
АдовЪ код
// class definition
private final Boolean address;
// do something
if (address == null) {
// ...
} else if (address == Boolean.TRUE) {
// ...
} else if (address == Boolean.FALSE) {
// ...
} else {
throw new IllegalArgumentException("Boolean must be one of [null], [TRUE], [FALSE]");
}
public class DBConnector {
public GlobalSaver gs = new GlobalSaver();
// ...
}
public class GlobalSaver {
private static DBConnector dbc = new DBConnector();
// ...
}
// somewhere in test
@Test
void test() {
// ...
DBConnector dbc = new DBConnector();
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment