@Test public void testLoadCodeThrowsNullPointerException() throws Throwable { BSHLogListener bSHLogListener = new BSHLogListener(); try { bSHLogListener.loadCode(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { } }
protected String loadCode(File f) throws IOException{ StringBuilder buf = new StringBuilder((int)f.length()); char[] content = new char[(int)f.length()]; int l; Reader r = new BufferedReader(new FileReader(f)); try { while((l=r.read(content))!=-1) buf.append(content,0,l); } finally { r.close(); } return buf.toString(); }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected String loadCode(File f) throws IOException{ StringBuilder buf = new StringBuilder((int)f.length()); char[] content = new char[(int)f.length()]; int l; Reader r = new BufferedReader(new FileReader(f)); try { while((l=r.read(content))!=-1) buf.append(content,0,l); } finally { r.close(); } return buf.toString(); } }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected String loadCode(File f) throws IOException{ StringBuilder buf = new StringBuilder((int)f.length()); char[] content = new char[(int)f.length()]; int l; Reader r = new BufferedReader(new FileReader(f)); try { while((l=r.read(content))!=-1) buf.append(content,0,l); } finally { r.close(); } return buf.toString(); } BSHLogListener(); }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected String loadCode(File f) throws IOException{ StringBuilder buf = new StringBuilder((int)f.length()); char[] content = new char[(int)f.length()]; int l; Reader r = new BufferedReader(new FileReader(f)); try { while((l=r.read(content))!=-1) buf.append(content,0,l); } finally { r.close(); } return buf.toString(); } BSHLogListener(); @Override void setConfiguration(org.jpos.core.Configuration cfg); @Override LogEvent log(LogEvent ev); }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected String loadCode(File f) throws IOException{ StringBuilder buf = new StringBuilder((int)f.length()); char[] content = new char[(int)f.length()]; int l; Reader r = new BufferedReader(new FileReader(f)); try { while((l=r.read(content))!=-1) buf.append(content,0,l); } finally { r.close(); } return buf.toString(); } BSHLogListener(); @Override void setConfiguration(org.jpos.core.Configuration cfg); @Override LogEvent log(LogEvent ev);  }