Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version lock for JDT in spotless #3498

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ subprojects {
/* At the moment, we have to ensure that version 4.22 of the eclipse formatter is run, since newer versions
* of the formatter crash in SymbolicExecutionTreeBuilder (seems to be a but in the formatter)!
*/
eclipse("4.22").configFile("$rootDir/scripts/tools/checkstyle/keyCodeStyle.xml")
eclipse().configFile("$rootDir/scripts/tools/checkstyle/keyCodeStyle.xml")
trimTrailingWhitespace() // not sure how to set this in the xml file ...
//googleJavaFormat().aosp().reflowLongStrings()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class TestSymbolicExecutionUtil extends AbstractSymbolicExecutionTestCase
public void test1ImproveReadability() throws ProblemLoaderException {
File location = new File(testCaseDirectory,
"/readability/InnerAndAnonymousTypeTest/InnerAndAnonymousTypeTest.java")
.getAbsoluteFile();
.getAbsoluteFile();
assertTrue(location.exists(), "Could not find required resource: " + location);

KeYEnvironment<?> environment = KeYEnvironment.load(location, null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static PosInOccurrence extractMatchingPio(final Sequent sequent, final St
for (int i = 1; i < sequent.size() + 1; i++) {
final boolean matchesRegex = formatTermString(
LogicPrinter.quickPrintTerm(sequent.getFormulabyNr(i).formula(), services))
.matches(".*" + matchRegEx + ".*");
.matches(".*" + matchRegEx + ".*");
if (matchesRegex) {
if (matched) {
throw new ScriptException("More than one occurrence of a matching term.");
Expand Down
4 changes: 3 additions & 1 deletion key.core/src/main/java/de/uka/ilkd/key/pp/LogicPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,9 @@ public void printPostfixTerm(Term t, int ass, String name) {
* the format is like
*
* <pre>
* {@code p & q}
* {@code
* p & q
* }
* </pre>
* <p>
* The subterms are printed using {@link #printTermContinuingBlock(Term)}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ public void beginExpr(ProofElementID eid, String str) {
errors.add(e);
}
}
case MERGE_ABSTRACTION_PREDICATES -> ((BuiltinRuleInformation) ruleInfo).currAbstractionPredicates =
str;
case MERGE_ABSTRACTION_PREDICATES ->
((BuiltinRuleInformation) ruleInfo).currAbstractionPredicates =
str;
case MERGE_USER_CHOICES -> ((BuiltinRuleInformation) ruleInfo).currUserChoices = str;
case NOTES -> {
ruleInfo.notes = str;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ public PosInOccurrence posInOccurrence() {
*
* <pre>
* {@code
* ifFormulaInstantiations () == null &&
* ( pos == null || termConstraint.isSatisfiable () )
* ifFormulaInstantiations() == null &&
* (pos == null || termConstraint.isSatisfiable())
* }
* </pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public SVInstantiations addInteresting(SchemaVariable sv, InstantiationEntry<?>
Services services) {
return new SVInstantiations(map.put(sv, entry), interesting().put(sv, entry),
getUpdateContext(), getGenericSortInstantiations(), getGenericSortConditions())
.checkSorts(sv, entry, false, services);
.checkSorts(sv, entry, false, services);
}


Expand Down Expand Up @@ -653,7 +653,7 @@ public String toString() {
public SVInstantiations add(GenericSortCondition p_c, Services services) throws SortException {
return new SVInstantiations(map, interesting(), getUpdateContext(),
getGenericSortInstantiations(), getGenericSortConditions().prepend(p_c))
.checkCondition(p_c, false, services);
.checkCondition(p_c, false, services);
}

public ExecutionContext getExecutionContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@
*
* <pre>
* {@code
* if (i<10) l1:{ l2:{ i++; } while (i<10) { i++; } }
* if (i < 10)
* l1: {
* l2: {
* i++;
* }
* while (i < 10) {
* i++;
* }
* }
* }
* </pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ public ImmutableSet<LoopContract> createJMLLoopContracts(final IProgramMethod me
clauses.continues, clauses.returns, clauses.signals, clauses.signalsOnly,
clauses.diverges, clauses.assignables, clauses.assignablesFree, clauses.hasAssignable,
clauses.hasFreeAssignable, clauses.decreases, services)
.create();
.create();
}

/**
Expand Down Expand Up @@ -1463,7 +1463,7 @@ public ImmutableSet<LoopContract> createJMLLoopContracts(IProgramMethod method,
clauses.continues, clauses.returns, clauses.signals, clauses.signalsOnly,
clauses.diverges, clauses.assignables, clauses.assignablesFree, clauses.hasAssignable,
clauses.hasFreeAssignable, clauses.decreases, services)
.create();
.create();
}

private ProgramVariableCollection createProgramVariablesForStatement(Statement statement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public Variable getVariable(String name, ProgramElement context) {
*/
EnumConstantSpecification ecs = (EnumConstantSpecification) ((EnumDeclaration) getType(
((Case) context.getASTParent()).getParent().getExpression()))
.getVariableInScope(name);
.getVariableInScope(name);
// must not resolve! qualifying enum constant in case-statements is forbidden!
return ecs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void testListReplaceAddRedundantList() {
// [exp.: p,q,a,b,c,r]
Semisequent expected = extract(extract(
extract(extract(origin.insertLast(con[4])).insertLast(con[5])).insertLast(con[6]))
.insertLast(con[2]));
.insertLast(con[2]));
// insert:[a,b,c,r,r,q,p]
ImmutableList<SequentFormula> insertionList =
ImmutableSLList.<SequentFormula>nil().prepend(con[0]).prepend(con[1]).prepend(con[2])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static ApplyStrategyInfo applyStrategy(Proof proof, Strategy strategy) {
proof.setActiveStrategy(strategy);
return new ApplyStrategy(
proof.getInitConfig().getProfile().getSelectedGoalChooserBuilder().create())
.start(proof, proof.openGoals().head());
.start(proof, proof.openGoals().head());
}

public final ProfilingDirectories getProfileDirectories() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void appendDataToZipOutputStream(ZipOutputStream stream) throws IOException {
zipEntryFileName += ".exception";
data = (e.getClass().getSimpleName() + " occured while trying to read data.\n"
+ e.getMessage() + "\n" + serializeStackTrace(e))
.getBytes(StandardCharsets.UTF_8);
.getBytes(StandardCharsets.UTF_8);
}
stream.putNextEntry(new ZipEntry(zipEntryFileName));
stream.write(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ private void processChar(char strChar) throws BadLocationException {

// case '*':
// case '/':
case '(', ')', '[', ']', '{', '}', '%', '!', '^', '~', '&', '|', '.', ':', ';', '?', '<', '>', '=', '\'' ->
case '(', ')', '[', ']', '{', '}', '%', '!', '^', '~', '&', '|', '.', ':', ';', '?', '<',
'>', '=', '\'' ->
// case ' ':
// case '"':
// case '\'':
Expand Down
21 changes: 18 additions & 3 deletions recoder/src/main/java/recoder/io/PropertyNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ public interface PropertyNames {
*
* <PRE>
* {@code
* while (i < n) { if (a[i] == x) { return i; } i += 1; }
* while (i < n) {
* if (a[i] == x) {
* return i;
* }
* i += 1;
* }
* }
* </PRE>
*
Expand All @@ -138,7 +143,12 @@ public interface PropertyNames {
*
* <PRE>
* {@code
* while (i < n) { if (a[i] == x) { return i; } i += 1; }
* while (i < n) {
* if (a[i] == x) {
* return i;
* }
* i += 1;
* }
* }
* </PRE>
*
Expand All @@ -147,7 +157,12 @@ public interface PropertyNames {
*
* <PRE>
* {@code
* while (i < n) { if (a[i] == x) { return i; } i += 1; }
* while (i < n) {
* if (a[i] == x) {
* return i;
* }
* i += 1;
* }
* }
* </PRE>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ public Variable getVariable(String name, ProgramElement context) {
*/
EnumConstantSpecification ecs = (EnumConstantSpecification) ((EnumDeclaration) getType(
((Case) context.getASTParent()).getParent().getExpression()))
.getVariableInScope(name);
.getVariableInScope(name);
// must not resolve! qualifying enum constant in case-statements is forbidden!
return ecs;
}
Expand Down
3 changes: 2 additions & 1 deletion recoder/src/main/java/recoder/util/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
*
* <pre>
* {@code
* lessOrEquals(x,y)==(less(x,y) || equals(x,y))}
* lessOrEquals(x, y) == (less(x, y) || equals(x, y))
* }
* ,
* </pre>
*
Expand Down
Loading