Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Wrong check for Samsung SKU's #264

@miv

Description

@miv

checkSku method for Samsung reads:

    public static void checkSku(String sku) {
        String[] skuParts = sku.split("/");
        if (skuParts.length != 2) {
            throw new IllegalArgumentException("Samsung SKU must contain ITEM_GROUP_ID and ITEM_ID.");
        }
        for (int i = 0; i < skuParts.length; i++) {
            if (!TextUtils.isDigitsOnly(skuParts[i])) {
                if (i == 0) {
                    throw new IllegalArgumentException("Samsung SKU must contain numeric ITEM_GROUP_ID.");
                } else if (i == 1) {
                    throw new IllegalArgumentException("Samsung SKU must contain numeric ITEM_ID.");
                }
            }
        }
    }

Thou GROUP_ID should be numeric, ITEM_ID should not. I successfully registered alphanumeric ids like in any other store and it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions