Problem with Passay 1.3.0

102 views
Skip to first unread message

dadan su

unread,
Jul 19, 2017, 6:41:33 AM7/19/17
to iDempiere
Dear Communities,

I just download fresh copy of source code from github, and materialize with adempiere.mspec.
After materialize, there is problem with class MPasswordRule.java, in line : PasswordData passwordData =  PasswordData.newInstance(newPassword, username, historyData);
Because the materialize import the org.passay version 1.3.0. In passay 1.3.0 , the method newInstance has been removed , and throw the compile error.

I changed the code to    :
          
            PasswordData passwordData = new PasswordData(username,newPassword);
            passwordData.setPasswordReferences(historyData);

Is it acceptable to change code like this ?

Thank You

Dadan.

Hiep Lq

unread,
Jul 19, 2017, 8:19:00 AM7/19/17
to Mohemmed Bilal Ilyas

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/9edb34dd-c45b-4911-a9fc-62341f7717a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Lê Quý Hiệp
Email: hie...@hasuvimex.vn
Skype: admin.hasuvimex

Company: Thanh Hoa Fishery Import - Export J.s.c  (HasuvimexDL 47
Add: Lot E, Le Mon Industrial Zone, Thanh Hoa, Vietnam

Hiep Lq

unread,
Jul 19, 2017, 9:16:43 AM7/19/17
to Mohemmed Bilal Ilyas
From code of TestUtils class, your change is ok. please test it and attach to jira.

public static PasswordData newPasswordData(
    final String p,
    final String u,
    final PasswordData.Origin o,
    final List<PasswordData.Reference> r)
  {
    final PasswordData pd = new PasswordData();
    if (p != null) {
      pd.setPassword(p);
    }
    if (u != null) {
      pd.setUsername(u);
    }
    if (o != null) {
      pd.setOrigin(o);
    }
    if (r != null) {
      pd.setPasswordReferences(r);
    }
    return pd;
  }

Gerald O'Sullivan

unread,
Jul 20, 2017, 12:45:06 AM7/20/17
to iDempiere
I hit  the same problem and logged an issue IDEMPIERE-3429.

I will try the work-around.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages