Skip to content

Commit af96049

Browse files
committed
Removing unneeded null checks.
1 parent 1f4de06 commit af96049

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/main/java/com/redhat/devtools/lsp4ij/features/formatting/LSPClientSideOnTypeFormattingTypedHandler.java

-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public Result charTyped(char charTyped,
8585
// Close braces
8686
if (onTypeFormattingSettings.formatOnCloseBrace &&
8787
// Make sure the formatter supports formatting of the configured scope
88-
(onTypeFormattingSettings.formatOnCloseBraceScope != null) &&
8988
((onTypeFormattingSettings.formatOnCloseBraceScope == FormattingScope.FILE) || rangeFormattingSupported)) {
9089
Map.Entry<Character, Character> bracePair = ContainerUtil.find(
9190
LSPIJEditorUtils.getBracePairs(file).entrySet(),
@@ -111,7 +110,6 @@ public Result charTyped(char charTyped,
111110
// Statement terminators
112111
if (onTypeFormattingSettings.formatOnStatementTerminator &&
113112
// Make sure the formatter supports formatting of the configured scope
114-
(onTypeFormattingSettings.formatOnStatementTerminatorScope != null) &&
115113
((onTypeFormattingSettings.formatOnStatementTerminatorScope == FormattingScope.FILE) || rangeFormattingSupported)) {
116114
if (StringUtil.isNotEmpty(onTypeFormattingSettings.formatOnStatementTerminatorCharacters) &&
117115
(onTypeFormattingSettings.formatOnStatementTerminatorCharacters.indexOf(charTyped) > -1)) {

0 commit comments

Comments
 (0)