Created
November 21, 2012 12:49
-
-
Save anton-rudeshko/4124699 to your computer and use it in GitHub Desktop.
АдовЪ код
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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