Skip to content

Commit

Permalink
Remove commented code (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored Feb 23, 2025
1 parent 0912674 commit fbfc018
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,12 @@ public void execute() throws EnforcerRuleException {
// re-read model, because M3 uses optimized model
MavenXpp3Reader modelReader = new MavenXpp3Reader();

Model model;
try (FileInputStream pomInputStream = new FileInputStream(project.getFile())) {
model = modelReader.read(pomInputStream, false);
Model model = modelReader.read(pomInputStream, false);
maven2Validation(model);
} catch (IOException | XmlPullParserException e) {
throw new EnforcerRuleError("Unable to retrieve the MavenProject: ", e);
}

// @todo reuse ModelValidator when possible

// Object modelValidator = null;
// try
// {
// modelValidator = helper.getComponent( "org.apache.maven.model.validation.ModelValidator" );
// }
// catch ( ComponentLookupException e1 )
// {
// // noop
// }

// if( modelValidator == null )
// {
maven2Validation(model);
// }
// else
// {
// }
}

private void maven2Validation(Model model) throws EnforcerRuleException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.testing.ArtifactStubFactory;
import org.apache.maven.project.MavenProject;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
Expand Down Expand Up @@ -62,12 +61,6 @@ class RequireReleaseDepsTest {
@InjectMocks
private RequireReleaseDeps rule;

@BeforeEach
void setUp() {
// ruleHelper = EnforcerTestUtils.getHelper(project);
// rule = new RequireReleaseDeps();
}

@Test
void testSearchNonTransitive() throws IOException {
when(session.getCurrentProject()).thenReturn(project);
Expand Down

0 comments on commit fbfc018

Please sign in to comment.