tushartushar / DesigniteJava

Detects smells and computes metrics of Java code
https://www.designite-tools.com/products-dj
Apache License 2.0
172 stars 64 forks source link

Exceptions while parsing literal numbers #80

Open ghost opened 1 year ago

ghost commented 1 year ago

Exception while parsing literal number (during Magic Number detection). For input string: "9494cb964d9e326e" under radix 16

public final class X {
    private X() {
        super(new UUID(0x9494cb964d9e326eL, 0x550468d1c740d863L));
    }
}

Exception while parsing literal number (during Magic Number detection). For input string: "0b1010101010100011101011111011011101011011011001110011010110001011"

    void test_InputByteArray_ReadAllPrimitives_Success() {
        final boolean expectedBoolean = true;
        final byte expectedByte = 0b01100010;
        final short expectedShort = (short) 0b1010111010110110;
        final int expectedInt = 0b11011010111001100011010010001010;
        final long expectedLong = 0b1010101010100011101011111011011101011011011001110011010110001011L;
    }

Exception while parsing literal number (during Magic Number detection). For input string: "0b1010"

        final var duid = DataUnitId.fromInteger(0b1010);