Skip to content

Conversation

@Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented May 21, 2025

this looks like bug, or unused code. test is green meaning blindspot, better use or loose.

https://checkstyle.sourceforge.io/checks/coding/emptystatement.html

tc;

100% (1/1) 100% (10/10) 98% (69/70) 93% (56/60)

@Pankraz76 Pankraz76 changed the title DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement. DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement May 21, 2025
@Pankraz76 Pankraz76 changed the title DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement [FIX] DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement May 21, 2025
@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 9b863a7 to fed3b09 Compare May 21, 2025 19:45
@Pankraz76 Pankraz76 marked this pull request as ready for review May 21, 2025 19:47
@Pankraz76 Pankraz76 changed the title [FIX] DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement [fix] DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement May 21, 2025
@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from fed3b09 to 4cef735 Compare May 21, 2025 20:58
@Pankraz76 Pankraz76 changed the title [fix] DefaultModelInterpolator Rule:EmptyControlStatement - Empty if statement fix: DefaultModelInterpolator PMD-Rule: EmptyControlStatement May 22, 2025
Copy link
Contributor Author

@Pankraz76 Pankraz76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOC

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 24, 2025

issue:
Error: DefaultModelInterpolatorTest.testProjectPropertyExtraction:650 expected: </test/path> but was: <D:\test\path>

image

seems persistent on windows.

@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 7f0c819 to 88f6192 Compare May 25, 2025 16:48
@Pankraz76 Pankraz76 requested a review from elharo May 25, 2025 17:29
@Pankraz76
Copy link
Contributor Author

seems persistent on windows.

hopefully the real impl. works now.

@Pankraz76
Copy link
Contributor Author

still:

Error: DefaultModelInterpolatorTest.testProjectPropertyExtraction:619 expected: </test/path> but was: <D:\test\path>

@Pankraz76
Copy link
Contributor Author

@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 0cdc48c to 13b1981 Compare May 26, 2025 08:25
@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 13b1981 to f0ec7f8 Compare May 26, 2025 19:09
@Pankraz76 Pankraz76 requested a review from elharo May 26, 2025 19:09
String result = (String) postProcess.invoke(interpolator, projectDir, request, nonUrlExpression, nonUrlValue);

// Verify normalization was NOT called
verify(mockUrlNormalizer, never()).normalize(nonUrlValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we care whether the normalize method was called? This appears to test implementation. I can imagine that the normalize method would be called and that would recognize that it doesn't have to change anything. That would not be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if its any good, but its seems to be reflection of current coding, therefore should be frozen with test, to be changed afterwards.

@Pankraz76 Pankraz76 changed the title fix: DefaultModelInterpolator PMD-Rule: EmptyControlStatement fix: emptyControlStatement in DefaultModelInterpolator Jun 6, 2025
@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 9d0a319 to 2b7607a Compare June 6, 2025 10:08
@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch 2 times, most recently from b8727f2 to 658b4e5 Compare June 6, 2025 10:49
@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 658b4e5 to 862198a Compare June 6, 2025 11:08
.next()
.getDirectory();
assertEquals(model.getBuild().getSourceDirectory(), sourceDirectory);
assertCollectorState(0, 0, 0, collector);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is now actually second assertion. Why does not change after test ramp-up?

@Test
public void shouldInterpolateSourceDirectoryReferencedFromResourceDirectoryCorrectly() throws Exception {
final SimpleProblemCollector collector = new SimpleProblemCollector();
assertCollectorState(0, 0, 0, collector);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init state empty okay, thats fine.

@Pankraz76 Pankraz76 requested a review from elharo June 6, 2025 11:10
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, there''s just too much going on here to understand what's changing. Most of it doesn't seem to have anything to do with the PR title. In fact, I can't even find where that is fixed, or tell if it is. If you don't send more focused PRs they aren't going to be reviewed or merged.

@Pankraz76
Copy link
Contributor Author

yes im sorry, extracted again. Its too much going on.

@Pankraz76 Pankraz76 force-pushed the fix-postProcess-error-prone-pmd branch from 862198a to 4e6ce50 Compare June 6, 2025 12:41
@Pankraz76
Copy link
Contributor Author

focus restored.

@Pankraz76 Pankraz76 requested a review from elharo June 6, 2025 12:41
@slachiewicz slachiewicz closed this Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants