lokeshj / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

Append64 throws NullPointerException #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start sample.html.
2. Click "Print Base64" button.
3. Receive "uncaught exception: java.lang.NullPointerException" in FireBug 
console.

What is the expected output? What do you see instead?
Program should send example data to printer. It does not work anymore.

What version of the product are you using? On what operating system?
1.3.9 works fine. 1.4.x is broken. Tested on few computers, Windows Vista, 
Windows 7. Firefox.

Please provide any additional information below.

Original issue reported on code.google.com by remigius...@ersystem.pl on 26 Jun 2012 at 11:27

GoogleCodeExporter commented 9 years ago
Try this:

applet.append("");  // Append a blank string to fix Issue 73
applet.append64("QTU5MCwxNjAwLDIsMywxLDEsTiwialplYnJhI...");

This is because to save on resources, I don't initialize PrintRaw until it's 
needed using the "getPrintRaw()" method.

public void append(String s) {
 getPrintRaw().append(s);
}

public void append64(String s) {
 printRaw.append(Base64.decode(base64)); // Should be getPrintRaw().append(Base64.decode(base64));
}

Should be fixed in the next version.  Sorry for the inconvenience.

-Tres

Original comment by tres.fin...@gmail.com on 27 Jun 2012 at 9:26

GoogleCodeExporter commented 9 years ago
Thank you, quick fix works.

Original comment by remigius...@ersystem.pl on 28 Jun 2012 at 1:40

GoogleCodeExporter commented 9 years ago
Fixed in version 1.4.3.  Download it here:

http://code.google.com/p/jzebra/downloads/list

-Tres

Original comment by tres.fin...@gmail.com on 30 Jun 2012 at 2:39