Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PMD Warning ImplicitSwitchFallThrough
Browse files Browse the repository at this point in the history
rubenporras committed Nov 9, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent fb64f19 commit b2fd51a
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@
import java.util.List;
import java.util.Set;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -122,7 +122,8 @@ public void failed(final Throwable e, final Description description) {

/** {@inheritDoc} */
@Override
public void finished(final Description description) {}
public void finished(final Description description) {
}
};

/**
@@ -314,7 +315,6 @@ protected void addTestProblems(final List<Throwable> problems) {
}
}

/** {@inheritDoc} */
@Override
public void stepStateChanged(final AbstractTestStep testStep, final TestStepState testStepState, final Throwable throwable) {
switch (testStepState) {
@@ -331,6 +331,7 @@ public void stepStateChanged(final AbstractTestStep testStep, final TestStepStat
break;
default:
logger.warn("???: " + testStep.getName());
break;
}
break;
case ERRORED:
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@

import java.util.List;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.jdt.core.IJavaProject;
@@ -67,6 +67,7 @@ public List<String> resolveValues(final TemplateVariable variable, final XtextTe
case "file": //$NON-NLS-1$
final String fileName = file.getName();
result.add(fileName.indexOf('.') > 0 ? fileName.substring(0, fileName.lastIndexOf('.')) : fileName);
break;
}
}
return Lists.newArrayList(Iterables.filter(result, Predicates.notNull()));
Original file line number Diff line number Diff line change
@@ -142,7 +142,7 @@ public void position(final Constituent target) throws IOException {
protected void loadEntries(final StorageAwareResource resource, final ZipInputStream zipIn) throws IOException {
ZipPositioner positioner = new ZipPositioner(zipIn);
// 1. resource contents
switch (mode.instruction(Constituent.CONTENT)) {
switch (mode.instruction(Constituent.CONTENT)) { // NOPMD ImplicitSwitchFallThrough
case SKIP:
break;
case PROXY:
@@ -340,7 +340,8 @@ public void loadResource(final Resource resource) throws IOException {
if (uri != null && uri.isHierarchical() && !uri.isRelative()) {
baseURI = uri;
}
boolean installDerivedState = ResourceSetOptions.installDerivedState(resourceSet); // must be read before readCompressedInt, see HACK comment inside readCompressedInt
boolean installDerivedState = ResourceSetOptions.installDerivedState(resourceSet); // must be read before readCompressedInt, see HACK comment inside
// readCompressedInt
int size = readCompressedInt();
if (!installDerivedState && size == 2) { // the InfererenceContainer is always in the second slot
size--;

0 comments on commit b2fd51a

Please sign in to comment.