Variable might not have been initialized, but I can't get around it...
I'm getting a variable might not have been initialized error, and I know why, but I can't get around it. Basically, this snippet of my code is reading in a map file for a game. The first two lines of the map file are configuration information, and the rest is coordinates for the tiling graphics.
while ((str = in.readLine()) !=null){
if(!read_info){
//process first line: tileset image, size, playerpos
temp = str.split(",");
loadTileset(temp[0],32);
size_x = Integer.parseInt(temp[1]);
size_y = Integer.parseInt(temp[2]);
map =new Tile[size_x][size_y];
player.resetLoc(Integer.parseInt(temp[3]),Integer.parseInt(temp[4]));
//process second line: impassible
str = in.readLine();
temp = str.split("!");
impassable =new Point[temp.length];
for(int m=0;m<temp.length;m++){
tmp_coords = temp[m].split(",");
impassable[m] =new Point(Integer.parseInt(tmp_coords[0]),Integer.parseInt(tmp_coords[1]));
}
read_info =true;
}else{
temp = str.split("!");
for(int i=0;i<size_x;i++){
tmp_coords = temp[i].split(",");
boolean ti =true;
for(int p=0;p<impassable.length;p++){
map[i][j] =new Tile(Integer.parseInt(tmp_coords[0]),Integer.parseInt(tmp_coords[1]),true);
}
}
j++;
}
}
I'm not including everything.. this should make sense. Impassable is a Point[].
I can't say how big the Impassable list will be until it reads the second line of the map file. However, that happens in the first run-through of the file-reading processes.
Is there a try/catch statement I can use to get past this?>

