Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error generating Lists #37

Open
tfdsimoes opened this issue Nov 19, 2023 · 0 comments
Open

Error generating Lists #37

tfdsimoes opened this issue Nov 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tfdsimoes
Copy link
Collaborator

tfdsimoes commented Nov 19, 2023

Giving the code

@PactDslBodyBuilder
public class DemoClass {

    private List<String> listString1;

    @Example("123")
    private List<String> listString2;

    private List<Long> listLong1;

    @Example("123")
    private List<Long> listLong2;

    private List<Integer> listInteger1;

    @Example("123")
    private List<Integer> listInteger2;

    private List<Float> listFloat1;

    @Example("123")
    private List<Float> listFloat2;

    private List<BigDecimal> listBigDecimal1;

    @Example("123")
    private List<BigDecimal> listBigDecimal2;

    private List<BigInteger> listBigInteger1;

    @Example("[123,123,123]")
    private List<BigInteger> listBigInteger2;

}

Give error initializing the variables

java.util.List<java.lang.String> listString1 = List.of("w9M");


        java.util.List<java.lang.String> listString2 = List.of("oHA8gsFQ");


        java.util.List<java.lang.Long> listLong1 = List.of(6112185605843085999);


        java.util.List<java.lang.Long> listLong2 = List.of(5304697305579390426);


        java.util.List<java.lang.Integer> listInteger1 = List.of(1631745136);


        java.util.List<java.lang.Integer> listInteger2 = List.of(1937626165);


        java.util.List<java.lang.Float> listFloat1 = List.of(5.127670439855929E307);


        java.util.List<java.lang.Float> listFloat2 = List.of(1.163853672731067E308);


        java.util.List<java.math.BigDecimal> listBigDecimal1 = List.of(1.6478729721549756E308);


        java.util.List<java.math.BigDecimal> listBigDecimal2 = List.of(3.089379336326123E307);


        java.util.List<java.math.BigInteger> listBigInteger1 = List.of(422694843);


        java.util.List<java.math.BigInteger> listBigInteger2 = List.of(208986387);

Most of the problem is related to the generation of list, since List.of cast wrong

@apenlor apenlor added the bug Something isn't working label Nov 20, 2023
@tfdsimoes tfdsimoes assigned tfdsimoes and unassigned tfdsimoes Nov 21, 2023
@tfdsimoes tfdsimoes changed the title Error generating List<BigInteger> Error generating Lists Nov 21, 2023
@tfdsimoes tfdsimoes self-assigned this Dec 9, 2023
@tfdsimoes tfdsimoes removed their assignment Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants