Skip to content

Commit 91b5c7e

Browse files
committed
Fix template to only apply pooling to org.apache.maven.api.model.Dependency
The template condition was too broad and would affect other Dependency classes like org.apache.maven.api.plugin.descriptor.Dependency. This change ensures that only the model Dependency class gets automatic pooling by checking both the class name and the package. This prevents unintended side effects on other Dependency classes in different packages that use the same template.
1 parent 9bf3bba commit 91b5c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mdo/model.vm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ public class ${class.name}
497497
) {
498498
return base;
499499
}
500-
#if ( $class.name == "Dependency" )
500+
#if ( $class.name == "Dependency" && $package == "org.apache.maven.api.model" )
501501
${class.name} newInstance = new ${class.name}(this);
502502
return DependencyPool.intern(newInstance);
503503
#else

0 commit comments

Comments
 (0)