This file contains 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
import java.net.URL; | |
import java.net.URLConnection; | |
import java.nio.charset.StandardCharsets; | |
import java.util.zip.ZipInputStream; | |
public class Main { | |
public static void main(String... args) throws Exception { | |
URL url = new URL(args[0]); | |
URLConnection con = url.openConnection(); | |
ZipInputStream zipStream = new ZipInputStream(con.getInputStream()); |
This file contains 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
//Null pointer exception risk | |
item.getOne().getTwo().whereIsTheData(); | |
//or ugly | |
One one = item.getOne(); | |
if (one != null) { | |
Two two = one.getTwo(); | |
if (two != null) { | |
Data data = two.whereIsTheData(); |