Env.parseVariable not keeping unparseable variable

Description

The method parseVariable from org.compiere.util.Env class will parse some text using the provided PO class. When the variable is not present in the PO, you can use the parameter keepUnparseable to determine if the variable will be deleted from the text or if it will remain there.

This is working when the PO class is provided, but when the PO class is null the variable is ripped off the text regardless the parameter keepUnparseable.

Here is a simple test you can run in Tools > Script:

Attached you can find the fix

Environment

None

Attachments

1

Activity

Fixed

Details

Assignee

Reporter

Labels

Tested By

Ricardo Alexsander Santana

Components

Affects versions

Priority

Created September 7, 2017 at 3:08 AM
Updated November 1, 2017 at 11:51 AM
Resolved September 8, 2017 at 1:19 PM