Skip to content

Associations with Java classes are handled inconsistently by CD2Pojo #123

Description

@schmalzing

Issue description

With active class2mc, Java classes can be used as source and target types of associations in class diagrams.

CD2Pojo currently handles associations with a CD class as source and a Java class as target, but silently ignores associations whose source is a Java class.

Reproduction

Example CD with a Java class as association source:

package test;

classdiagram CD1 {
  association Class -> Class;
}

Actual behavior

Associations whose source is a Java class are silently ignored. No generated field, accessor, or other Java representation is created.

Associations whose source is a CD class and whose target is a Java class are considered during generation.

Expected behavior

Java classes should not be permitted as either source or target of an association in a class diagram.

A context condition should reject both examples with a clear error message. Java classes may still be used as attribute types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions