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

Pcm2Java reactions: Rename Operation Required Role fails to remove old assignment in constructor #251

Open
h4uges opened this issue Oct 31, 2022 · 0 comments
Labels
Java Related to Java Applications or Java Domain PCM Related to PCM Applications or PCM Domain

Comments

@h4uges
Copy link
Contributor

h4uges commented Oct 31, 2022

An OperationRequiredRole in Pcm creates, among other things, an assignment statement in the constructor of the associated component. When renaming an OperationRequiredRole, the old statement is not removed but a new assignment statement is added. The same behavior probably also occurs on other changes to OperationRequiredRole.

public class TestBasicComponentImpl {
	public TestBasicComponentImpl(testRepository.contracts.TestInterface newName) {
		this.oldName = oldName; // not removed assignment
		this.newName = newName;
	}
	private testRepository.contracts.TestInterface newName;
}

To fix this the correspondence model of OperationRequiredRoles has to be changed. Currently, a part of the correspondences is not resolved via the correspondence model but via the entity name.

#243 adds a unit test which tests this behavior, that is currently disabled (OperationRequiredRoleMappingTransformationTest.testChangeOfOperationRequiredRole)

@JanWittler JanWittler added Java Related to Java Applications or Java Domain PCM Related to PCM Applications or PCM Domain labels Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Related to Java Applications or Java Domain PCM Related to PCM Applications or PCM Domain
Projects
None yet
Development

No branches or pull requests

2 participants