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

[MNG-6847] Use diamond operator #4

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public Map<String, BookContext.BookFile> getFiles()
{
if ( files == null )
{
files = new HashMap<String, BookContext.BookFile>();
files = new HashMap<>();
}

return files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ else if ( name.endsWith( extension ) )
{
getLogger().debug( "Dumping document <-> id mapping:" );

Map<String, BookContext.BookFile> map = new TreeMap<String, BookContext.BookFile>( context.getFiles() );
Map<String, BookContext.BookFile> map = new TreeMap<>( context.getFiles() );

for ( Map.Entry<String, BookContext.BookFile> entry : map.entrySet() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private void writeBook( BookModel book, BookContext context, PrintWriter writer
// Process all the section documents and collect their names
// ----------------------------------------------------------------------

Map<String, SectionInfo> sectionInfos = new HashMap<String, SectionInfo>();
Map<String, SectionInfo> sectionInfos = new HashMap<>();

for ( Chapter chapter : book.getChapters() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public List<String> getErrors()
{
if ( errors == null )
{
errors = new ArrayList<String>();
errors = new ArrayList<>();
}

return errors;
Expand All @@ -70,7 +70,7 @@ public List<String> getWarnings()
{
if ( warnings == null )
{
warnings = new ArrayList<String>();
warnings = new ArrayList<>();
}

return warnings;
Expand Down