Skip to content

RuleModeler crashes when a java class name without package is used in an Assignment #744

@jvanek

Description

@jvanek

If a rule is in a d2w.user file wher an Assignment is done to a java class without package (ie without any . in its name) the RuleModeler crashes.

The fix is to change the line 139 in Assigment.m from:

unsigned lastDotIndex = [aClassName rangeOfString:@"." options:NSBackwardsSearch].location;

to

NSInteger lastDotIndex = [aClassName rangeOfString:@"." options:NSBackwardsSearch].location;

as the unsigned int is out of limits of a NSInteger, the test below NSNotFound doesn't match and the code crashes.

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