Trying to upgrade to the latest version and converting some of our code to remove the deprecated methods, but in one of our subroutines we are getting this error. The code is as follows:
String str = new String(textPage);
TextArea textArea = new TextArea(str, 0, 0, 500, 700);
textArea.setFont(Font.getCourier());
textArea.setFontSize(10);
do {
Page page = new Page();
page.getElements().add(textArea);
document.getPages().add(page);
textArea = textArea.getOverflowTextArea();
} while (textArea != null);
It then throws this error.
If I change the code to:
String str = new String(textPage);
TextArea textArea = new TextArea(str, 0, 0, 500, 700);
textArea.setFont(FontFamily.getCourier().getRegular());
textArea.setFontSize(10);
do {
Page page = new Page();
page.getElements().add(textArea);
document.getPages().add(page);
textArea = textArea.getOverflowTextArea();
} while (textArea != null);
Then the code doesn't fail. Looks like a unit test should be written :)