Skip to content

Commit

Permalink
Issue #440: resolves UnnecessaryParenthesesExtended
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach authored and Calixte committed Jan 28, 2023
1 parent 33f5ee6 commit e5097b8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public int compare(RuleGroupMetadata arg0, RuleGroupMetadata arg1) {
int prio1 = arg0.getPriority();
int prio2 = arg1.getPriority();

return (prio1 < prio2 ? -1 : (prio1 == prio2 ? 0 : 1));
return prio1 < prio2 ? -1 : (prio1 == prio2 ? 0 : 1);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static List<IProject> getProjectsUsingConfig(ICheckConfiguration checkCon

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject[] projects = workspace.getRoot().getProjects();
for (int i = 0; (i < projects.length); i++) {
for (int i = 0; i < projects.length; i++) {
if (ProjectConfigurationFactory.getConfiguration(projects[i]).isConfigInUse(checkConfig)) {
result.add(projects[i]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void setActivePart(final IAction arg0, final IWorkbenchPart arg1) {
@Override
public void run(final IAction arg0) {
final TransformCheckstyleRulesJob job = new TransformCheckstyleRulesJob(
((IProject) ((IStructuredSelection) mSelection).getFirstElement()));
(IProject) ((IStructuredSelection) mSelection).getFirstElement());
job.schedule();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public boolean select(Viewer viewer, Object parentElement, Object element) {
});

mAddButton = new Button(knownModules, SWT.PUSH);
mAddButton.setText((Messages.CheckConfigurationConfigureDialog_btnAdd));
mAddButton.setText(Messages.CheckConfigurationConfigureDialog_btnAdd);
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.END;
mAddButton.setLayoutData(gridData);
Expand Down Expand Up @@ -352,12 +352,12 @@ private Control createTableViewer(Composite parent) {
buttons.setLayoutData(new GridData());

mRemoveButton = new Button(buttons, SWT.PUSH);
mRemoveButton.setText((Messages.CheckConfigurationConfigureDialog_btnRemove));
mRemoveButton.setText(Messages.CheckConfigurationConfigureDialog_btnRemove);
mRemoveButton.setLayoutData(new GridData());
mRemoveButton.addSelectionListener(mController);

mEditButton = new Button(buttons, SWT.PUSH);
mEditButton.setText((Messages.CheckConfigurationConfigureDialog_btnOpen));
mEditButton.setText(Messages.CheckConfigurationConfigureDialog_btnOpen);
mEditButton.setLayoutData(new GridData());
mEditButton.addSelectionListener(mController);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ private void initWorkingSetLabel() {
if (mSelectedWorkingSet == null) {
mLblSelectedWorkingSet.setText(Messages.CheckstyleMarkerFilterDialog_msgNoWorkingSetSelected);
} else {
mLblSelectedWorkingSet.setText((mSelectedWorkingSet.getName()));
mLblSelectedWorkingSet.setText(mSelectedWorkingSet.getName());
}
}

Expand Down

0 comments on commit e5097b8

Please sign in to comment.