Skip to content
Open
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 @@ -85,7 +85,7 @@ public void testXIssueExpressionWithMarkerFeatureMessageParameters() throws Exce
@Disabled("Fails because DocumentedImplCustom uses the null resource description provider to get the document provider")
public void testInferingOfDescription() throws Exception {
final Check check = util.getFirstInstanceOf(parser.parse(modelUtil.modelWithCheck()), Check.class);
assertEquals(check.getDescription(), "No documentation.");
assertEquals("No documentation.", check.getDescription());
}

/* Tests that Checks have an implicit name which matches the ID. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ private void assertQuickFixExistsAndSuccessful(final String issueCode, final Str
private void assertQuickFixExistsAndSuccessful(final String issueCode, final String quickfixLabel, final String expectedContent, final boolean ignoreFormatting) {
// Assert amount of quickfixes
int resolutionCount = resolutionsFor(issueCode, quickfixLabel).size();
assertEquals(resolutionCount, 1, String.format("There must be exactly one quickfix with label '%s' for issue '%s', but found '%d'.", quickfixLabel, issueCode, resolutionCount));
assertEquals(1, resolutionCount, String.format("There must be exactly one quickfix with label '%s' for issue '%s', but found '%d'.", quickfixLabel, issueCode, resolutionCount));
// Apply quickfix
UiThreadDispatcher.dispatchAndWait(new Runnable() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public EPackage apply(final IEObjectDescription from) {
})).toArray(new EPackage[0]);
registerMetaModel(new EmfRegistryMetaModel() {
@Override
public EPackage[] allPackages() {
protected EPackage[] allPackages() {
return ePackages;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void registerMetaModels(final ScopeModel model) {
final EPackage[] ePackages = Lists.newArrayList(Iterables.transform(EObjectUtil.getScopeProviderByEObject(model).getScope(model, ScopePackage.Literals.IMPORT__PACKAGE).getAllElements(), d -> (EPackage) EcoreUtil.resolve(d.getEObjectOrProxy(), model))).toArray(new EPackage[0]);
registerMetaModel(new EmfRegistryMetaModel() {
@Override
public EPackage[] allPackages() {
protected EPackage[] allPackages() {
return ePackages;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ private void assertNoDiagnostic(final Diagnostic diagnostics, final String issue
* the diagnostic to check for issues
*/
private void assertNoDiagnostics(final Diagnostic diagnostics) {
assertEquals(diagnostics.getCode(), Diagnostic.OK, "Diagnostics should be in OK state.");
assertEquals(Diagnostic.OK, diagnostics.getCode(), "Diagnostics should be in OK state.");
assertTrue(diagnostics.getChildren().isEmpty(), "There should be no diagnostics. Instead found " + diagnostics.getChildren().size());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ public EObject getEObjectFromSegment(final EObject container, final String segme
}

@Override
// make method public for testing
// make method accessible for testing
@SuppressWarnings("PMD.UselessOverridingMethod")
public void appendEscaped(final String text, final StringBuilder builder) {
protected void appendEscaped(final String text, final StringBuilder builder) {
super.appendEscaped(text, builder);
}

@Override
// make method public for testing
// make method accessible for testing
@SuppressWarnings("PMD.UselessOverridingMethod")
public String unescape(final String text) {
protected String unescape(final String text) {
return super.unescape(text);
}
}
Expand All @@ -57,7 +57,7 @@ public String unescape(final String text) {
public void testEscape() {
StringBuilder builder = new StringBuilder();
fragmentProvider.appendEscaped("foo/bar#\\", builder);
assertEquals(builder.toString(), "foo\\/bar#\\\\", "Fragment not properly scaped");
assertEquals("foo\\/bar#\\\\", builder.toString(), "Fragment not properly scaped");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void testGetMappings() {

URI noSuchValue = URI.createURI("scheme:/anotherHost");
expected = lookup.getMappings(noSuchValue);
assertEquals(expected.size(), 0);
assertEquals(0, expected.size());
}

private QualifiedName name(final String str) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <T> Collection<T> matches(final QualifiedName lower, final int lowerIdx, final S
final Collection<T> result = excludeDuplicates ? Sets.<T> newHashSet() : Lists.<T> newArrayList();
Visitor visitor = new Visitor() {
@Override
public void visit(final SegmentNode node) {
void visit(final SegmentNode node) {
if (node.values != null) {
for (Object value : node.values) {
result.add((T) value);
Expand Down Expand Up @@ -406,7 +406,7 @@ <T> Collection<T> matches(final QualifiedName lower, final int lowerIdx, final S
final Set<Object[]> arrays = Sets.newHashSet();
Visitor visitor = new Visitor() {
@Override
public void visit(final SegmentNode node) {
void visit(final SegmentNode node) {
if (node.values != null) {
arrays.add(node.values);
}
Expand Down Expand Up @@ -543,7 +543,7 @@ public Collection<T> get(final QualifiedName name) {
public void removeMappings(final T value) {
root.accept(new Visitor() {
@Override
public void visit(final SegmentNode node) {
void visit(final SegmentNode node) {
Object[] newValues = ArrayUtils.remove(node.values, value);
if (newValues != node.values) {
node.values = newValues;
Expand Down