Skip to content

Commit

Permalink
[MJAVADOC-700] Plugin duplicates classes in Java 8 all-classes lists
Browse files Browse the repository at this point in the history
Replaced an occurrence of File#separatorChar that causes classes to be listed
twice in Java 8 on Windows.

This closes #180
  • Loading branch information
robtimus authored and michael-o committed Feb 12, 2023
1 parent fabff9c commit 4123315
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4550,7 +4550,7 @@ private List<String> getFilesWithUnnamedPackages( Map<Path, Collection<String>>
continue;
}

if ( currentFile.indexOf( File.separatorChar ) == -1 )
if ( currentFile.indexOf( '/' ) == -1 )
{
returnList.add( currentSourcePath.resolve( currentFile ).toAbsolutePath().toString() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,12 @@ public void testDefaultConfiguration()
if ( JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore( "11" ) )
{
assertThat( apidocs.resolve( "def/configuration/package-frame.html" )).exists();
assertThat( apidocs.resolve( "allclasses-frame.html" )).exists();
assertThat( apidocs.resolve( "allclasses-noframe.html" )).exists();
assertThat( apidocs.resolve( "allclasses-frame.html" )).exists()
.content().containsOnlyOnce("def/configuration/App.html")
.containsOnlyOnce("def/configuration/AppSample.html");
assertThat( apidocs.resolve( "allclasses-noframe.html" )).exists()
.content().containsOnlyOnce("def/configuration/App.html")
.containsOnlyOnce("def/configuration/AppSample.html");
}

// class level generated javadoc files
Expand Down

0 comments on commit 4123315

Please sign in to comment.