It looks like a very common beginner mistake, something everyone does
once but few ever repeat: you've got at least two different variables named "Warehouses". One of them is local to the first method you show here; the other one is, I'm assuming, a member variable in the class. You initialize and store elements into the local one, which is discarded when that method returns. The class member one remains null, so when the second method
you should above tries to read it, you get the NullPointerException.
To be explicit: this defines a variable and gives it a value:
ArrayList foo = new ArrayList();
while this assigns to a pre-existing variable:
foo = new ArrayList();
Your first method above should be doing the latter, not the former.
A couple more comments: following common
Java coding conventions and naming variables and methods with names starting with lower-case letters makes your code easier for other Java programmers to read. And you can simplify your first method by getting rid of "i" and just using the one-argument "ArrayList.add()", which adds at the end.