Skip to content

Commit

Permalink
CODE-3531: increased the number of recent files from 8 to 20 (#7222)
Browse files Browse the repository at this point in the history
* CODE-3531: increased the number of recent files from 8 to 20, but it is not configurable
Massive refactoring of PropertyContext.java and switching to Java's Optional and Streams if possible.
Slightly reduced the dependency to ApacheCommons.
Resolved many warnings suggested by IDEA and SonarLint.

Signed-off-by: Vest <[email protected]>

* Replaced 4 spaces with \t
Added two @param descriptions (for IDEA).

Signed-off-by: Vest <[email protected]>

---------

Signed-off-by: Vest <[email protected]>
  • Loading branch information
Vest authored Nov 16, 2024
1 parent d30055b commit 800c802
Show file tree
Hide file tree
Showing 11 changed files with 432 additions and 460 deletions.
15 changes: 5 additions & 10 deletions code/src/java/pcgen/core/SystemCollections.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,10 @@ private SystemCollections()
*/
public static GameMode getGameModeNamed(final String aString)
{
for (GameMode gameMode : GAME_MODE_LIST)
{
if (gameMode.getName().equalsIgnoreCase(aString))
{
return gameMode;
}
}

return null;
return GAME_MODE_LIST.stream()
.filter(gameMode -> gameMode.getName().equalsIgnoreCase(aString))
.findFirst()
.orElse(null);
}

/**
Expand Down Expand Up @@ -171,7 +166,7 @@ public static List<EquipSlot> getUnmodifiableEquipSlotList()
}

/**
* Return an <b>unmodifiable</b> version of the body structure list for the
* Return an <b>unmodifiable</b> version of the body structure list for the
* current gamemode.
* @return an <b>unmodifiable</b> version of the body structure list.
*/
Expand Down
Loading

0 comments on commit 800c802

Please sign in to comment.