Menu

#2674 MailText.parse not working when mailtext is null

open-fixed
nobody
Requests (5)
5
2011-08-28
2011-08-28
No

When using one of the functions MailText.getMailtext / getMailText2 / getMailText3 the content of the mailtext is parsed for specific tokens.
The parsing fails when mailtext has no content (is null).

Regards,
Dirk Niemeyer

Discussion

  • Dirk Niemeyer

    Dirk Niemeyer - 2011-08-28

    Proposed patch:

    Index: base/src/org/compiere/model/MMailText.java

    --- base/src/org/compiere/model/MMailText.java
    +++ base/src/org/compiere/model/MMailText.java
    @@ -151,7 +151,7 @@
    */

    private String parse (String text)

    {

    - if (text.indexOf('@') == -1)

    + if (text == null || text.indexOf('@') == -1)

    return text;

    // Parse User

    text = parse (text, m_user);

     
  • Dirk Niemeyer

    Dirk Niemeyer - 2011-08-28
    • summary: MailText.parse not working when mailtest is null --> MailText.parse not working when mailtext is null
     
  • Dirk Niemeyer

    Dirk Niemeyer - 2011-08-28
    • status: open --> open-fixed
     

Log in to post a comment.