Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: User Defined Java Step

  1. #1
    njain111 Guest

    Default User Defined Java Step

    How to check if two integers are equal in user defined java step.

    A==B ? true: false

    do not work.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    No auto-unboxing in this case, so use "A.intValue() == B.intValue()" or "A.equals(B)"
    So long, and thanks for all the fish.

  3. #3
    njain111 Guest

    Default

    Thanks Marabu, that works but blows out if any one of them is null.

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    It's a shame

    Just guard against it with A!= null && B != null or whatever you like.
    So long, and thanks for all the fish.

  5. #5
    njain111 Guest

    Default

    ha! Got it, Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.