From: Hendrik <nh...@us...> - 2006-06-15 17:19:05
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20076/src/games/stendhal/server/entity Modified Files: Player.java Log Message: Fixed NullPointerException on non existing admin.list Index: Player.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/Player.java,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** Player.java 14 Jun 2006 18:30:45 -0000 1.163 --- Player.java 15 Jun 2006 17:18:53 -0000 1.164 *************** *** 492,503 **** .getResourceAsStream("data/conf/admins.list"); ! BufferedReader in = new BufferedReader( ! new InputStreamReader(is)); ! ! String line; ! while ((line = in.readLine()) != null) { ! adminNames.add(line); } - in.close(); } catch (Exception e) { logger.error("Error loading admin names", e); --- 492,508 ---- .getResourceAsStream("data/conf/admins.list"); ! if (is == null) { ! logger.info("data/conf/admin.list does not exist."); ! } else { ! ! BufferedReader in = new BufferedReader( ! new InputStreamReader(is)); ! ! String line; ! while ((line = in.readLine()) != null) { ! adminNames.add(line); ! } ! in.close(); } } catch (Exception e) { logger.error("Error loading admin names", e); |