From: Benjamin R. <ran...@us...> - 2007-08-02 05:21:15
|
Update of /cvsroot/jrobin/src/org/jrobin/graph In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13308/src/org/jrobin/graph Modified Files: RrdGraphDef.java Log Message: fix verboseness, and do not use the system class loader Index: RrdGraphDef.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/graph/RrdGraphDef.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** RrdGraphDef.java 31 Jul 2007 21:04:02 -0000 1.26 --- RrdGraphDef.java 2 Aug 2007 05:21:11 -0000 1.27 *************** *** 139,148 **** try { ! InputStream fontStream = ClassLoader.getSystemClassLoader().getResourceAsStream(name); font = Font.createFont(Font.TRUETYPE_FONT, fontStream); fontStream.close(); } catch (Exception e) { System.err.println("An error occurred loading the font '" + name + "'. Falling back to the default."); ! e.printStackTrace(); font = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 10); } --- 139,148 ---- try { ! InputStream fontStream = this.getClass().getResourceAsStream(name); font = Font.createFont(Font.TRUETYPE_FONT, fontStream); fontStream.close(); } catch (Exception e) { System.err.println("An error occurred loading the font '" + name + "'. Falling back to the default."); ! // e.printStackTrace(); font = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 10); } |