Skip to content

Commit

Permalink
mP1/walkingkooka#2854 Formatting: continuation indent 4 was 8
Browse files Browse the repository at this point in the history
- mP1/walkingkooka#2854
- Formatting: continuation indent 4 was 8
  • Loading branch information
mP1 committed Jan 8, 2025
1 parent f01b27c commit f75e5ee
Show file tree
Hide file tree
Showing 157 changed files with 550 additions and 548 deletions.
3 changes: 2 additions & 1 deletion src/it/gwt-jar-test/src/test/java/test/TestGwtSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@

@RunWith(Suite.class)
@Suite.SuiteClasses({TestGwtTest.class})
public class TestGwtSuite {}
public class TestGwtSuite {
}
1 change: 1 addition & 0 deletions src/it/gwt-jar-test/src/test/java/test/TestGwtTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void testAssertEquals() {
private final static SpreadsheetLabelNameResolver LABEL_NAME_RESOLVER = SpreadsheetLabelNameResolvers.fake();

private final static ProviderContext PROVIDER_CONTEXT = ProviderContexts.fake();

public void testWithCellReference() {
final SpreadsheetEngine engine = engine();
final SpreadsheetEngineContext engineContext = engineContext(engine);
Expand Down
1 change: 1 addition & 0 deletions src/it/junit-test/src/test/java/test/JunitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public class JunitTest {
private final static SpreadsheetLabelNameResolver LABEL_NAME_RESOLVER = SpreadsheetLabelNameResolvers.fake();

private final static ProviderContext PROVIDER_CONTEXT = ProviderContexts.fake();

@Test
public void testMetadataNonLocaleDefaults() {
Assert.assertNotEquals(null, SpreadsheetMetadata.NON_LOCALE_DEFAULTS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public int compare(final List<SpreadsheetCell> left,
}
result = comparator.compare(
left.get(i),
right.get(i),
context
);
right.get(i),
context
);
if (Comparators.EQUAL != result) {
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public Object cellValue(final SpreadsheetCell cell) {
}
},

FORMULA{
FORMULA {
@Override
public Object cellValue(final SpreadsheetCell cell) {
return cell.formula();
}
},

FORMATTER{
FORMATTER {
@Override
public Object cellValue(final SpreadsheetCell cell) {
return cell.formula();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public static SpreadsheetFormula parse(final TextCursor text,
final Optional<ParserToken> token = parser.orFailIfCursorNotEmpty(
ParserReporters.invalidCharacterExceptionAndExpected()
).parse(
text,
context
);
text,
context
);
formula = EMPTY.setText(
begin.textBetween()
.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public Set<SpreadsheetCellReference> cells() {
}

private Set<SpreadsheetCellReference> cells;

// columns..........................................................................................................

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public static List<SpreadsheetComparatorNameAndDirection> tryParseSpreadsheetCom
}



/**
* Parses the text into a single {@link SpreadsheetColumnOrRowSpreadsheetComparatorNames}.
* <pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ public String text() {
public Set<SpreadsheetComparatorName> names() {
return Sets.immutable(
this.stream()
.flatMap(n -> n.comparatorNameAndDirections().stream())
.map(nad -> nad.name())
.collect(Collectors.toCollection(Sets::ordered))
.flatMap(n -> n.comparatorNameAndDirections().stream())
.map(nad -> nad.name())
.collect(Collectors.toCollection(Sets::ordered))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public static List<SpreadsheetColumnOrRowSpreadsheetComparators> parse(final Str
.map(nad -> nad.direction()
.apply(
Cast.to(
provider.spreadsheetComparator(
nad.name(),
Lists.empty(),
context
)
provider.spreadsheetComparator(
nad.name(),
Lists.empty(),
context
)
)
)
).collect(Collectors.toList())
Expand Down Expand Up @@ -127,7 +127,7 @@ public int compare(final SpreadsheetCell left,
result = missingLeft && missingRight ?
Comparators.EQUAL :
missingLeft ?
Comparators.MORE :
Comparators.MORE :
Comparators.LESS; // missing | nulls etc come AFTER
} else {
result = comparator.compare(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public SpreadsheetComparatorInfoSet deleteIf(final Predicate<? super Spreadsheet

@Override
public SpreadsheetComparatorInfoSet replace(final SpreadsheetComparatorInfo oldInfo,
final SpreadsheetComparatorInfo newInfo) {
final SpreadsheetComparatorInfo newInfo) {
return this.setElements(
this.pluginInfoSet.replace(
oldInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static boolean isChar(final int pos,
// constants........................................................................................................

private final static String DATE_STRING = "date";

public final static SpreadsheetComparatorName DATE = registerConstant(DATE_STRING);

private final static String DATE_TIME_STRING = "date-time";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ public static SpreadsheetComparatorNameList with(final List<SpreadsheetComparato
private static SpreadsheetComparatorNameList with0(final List<SpreadsheetComparatorName> names) {
final SpreadsheetComparatorNameList list;

switch(names.size()) {
switch (names.size()) {
case 0:
list = EMPTY;
break;
list = EMPTY;
break;
default:
list = new SpreadsheetComparatorNameList(names);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public SpreadsheetComparatorName name(final String text) {

@Override
public Optional<SpreadsheetComparatorName> parseName(final TextCursor cursor,
final ParserContext context) {
final ParserContext context) {
Objects.requireNonNull(cursor, "cursor");
Objects.requireNonNull(context, "context");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ default void spreadsheetComparatorAndCheck(final SpreadsheetComparatorProvider p
() -> name + " " + values
);
}

// spreadsheetComparatorInfos.......................................................................................

default void spreadsheetComparatorInfosAndCheck(final SpreadsheetComparatorInfo... expected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ public SpreadsheetComparator<?> spreadsheetComparator(final SpreadsheetComparato

@Override
public SpreadsheetComparator<?> spreadsheetComparator(final SpreadsheetComparatorName name,
final List<?> values,
final ProviderContext context) {
final List<?> values,
final ProviderContext context) {
Objects.requireNonNull(name, "name");
Objects.requireNonNull(values, "values");
Objects.requireNonNull(context, "context");

final SpreadsheetComparator<?> comparator = NAME_TO_COMPARATOR.get(name);
if(null == comparator) {
if (null == comparator) {
throw new IllegalArgumentException("Unknown comparator " + name);
}
if(false == values.isEmpty()) {
if (false == values.isEmpty()) {
throw new IllegalArgumentException("Got " + values + " expected none");
}
return comparator;
Expand All @@ -92,22 +92,22 @@ public SpreadsheetComparatorInfoSet spreadsheetComparatorInfos() {

private final static Map<SpreadsheetComparatorName, SpreadsheetComparator<?>> NAME_TO_COMPARATOR = Maps.readOnly(
Lists.of(
SpreadsheetComparators.date(),
SpreadsheetComparators.dateTime(),
SpreadsheetComparators.dayOfMonth(),
SpreadsheetComparators.dayOfWeek(),
SpreadsheetComparators.hourOfAmPm(),
SpreadsheetComparators.hourOfDay(),
SpreadsheetComparators.minuteOfHour(),
SpreadsheetComparators.monthOfYear(),
SpreadsheetComparators.nanoOfSecond(),
SpreadsheetComparators.number(),
SpreadsheetComparators.secondsOfMinute(),
SpreadsheetComparators.text(),
SpreadsheetComparators.textCaseInsensitive(),
SpreadsheetComparators.time(),
SpreadsheetComparators.year()
).stream()
SpreadsheetComparators.date(),
SpreadsheetComparators.dateTime(),
SpreadsheetComparators.dayOfMonth(),
SpreadsheetComparators.dayOfWeek(),
SpreadsheetComparators.hourOfAmPm(),
SpreadsheetComparators.hourOfDay(),
SpreadsheetComparators.minuteOfHour(),
SpreadsheetComparators.monthOfYear(),
SpreadsheetComparators.nanoOfSecond(),
SpreadsheetComparators.number(),
SpreadsheetComparators.secondsOfMinute(),
SpreadsheetComparators.text(),
SpreadsheetComparators.textCaseInsensitive(),
SpreadsheetComparators.time(),
SpreadsheetComparators.year()
).stream()
.collect(
Collectors.toMap(
HasName::name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ private GeneralSpreadsheetConverterMapping(final T booleanValue,
@Override
public String toString() {
return ToStringBuilder.empty()
.separator(", " )
.label("boolean" ).value(this.booleanValue)
.label("date" ).value(this.date)
.label("dateTime" ).value(this.dateTime)
.label("number" ).value(this.number)
.separator(", ")
.label("boolean").value(this.booleanValue)
.label("date").value(this.date)
.label("dateTime").value(this.dateTime)
.label("number").value(this.number)
.label("string").value(this.string)
.label("time").value(this.time)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private void addReferences(final SpreadsheetCell cell) {
cell.reference(),
this.context
)::accept
);
);
}

/**
Expand Down Expand Up @@ -416,7 +416,7 @@ Optional<SpreadsheetCellRangeReference> deletedAndUpdatedCellRange() {
SpreadsheetRowReference top = null;
SpreadsheetRowReference bottom = null;

for(final SpreadsheetCellReference cell : this.updatedAndDeletedCells.keySet()) {
for (final SpreadsheetCellReference cell : this.updatedAndDeletedCells.keySet()) {
final SpreadsheetColumnReference column = cell.column();
final SpreadsheetRowReference row = cell.row();

Expand All @@ -433,8 +433,8 @@ Optional<SpreadsheetCellRangeReference> deletedAndUpdatedCellRange() {
}
}

for(final SpreadsheetLabelMapping labelMapping : this.updatedAndDeletedLabels.values()) {
if(null != labelMapping) {
for (final SpreadsheetLabelMapping labelMapping : this.updatedAndDeletedLabels.values()) {
if (null != labelMapping) {
SpreadsheetExpressionReference target;
do {
target = labelMapping.target();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ public boolean isPure(final ExpressionFunctionName function) {
return this.spreadsheetProvider.expressionFunction(
function,
Lists.empty(),
this
).isPure(this);
this
).isPure(this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ SpreadsheetDelta go() {
}

private void addCell(final SpreadsheetCellReference cell) {
if(this.window.test(cell)) {
if (this.window.test(cell)) {
if (this.add(
cell,
this.cells,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public LocalDateTime now() {
public Optional<EmailAddress> user() {
throw new UnsupportedOperationException();
}

// formula..........................................................................................................

@Override
public SpreadsheetParserToken parseFormula(final TextCursor formula) {
Objects.requireNonNull(formula, "formula");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static SpreadsheetCellFindQuery parse(final String text) {
}
}

if(false == cursor.isEmpty()) {
if (false == cursor.isEmpty()) {
throw new IllegalArgumentException("Invalid query got " + CharSequences.quoteAndEscape(text));
}

Expand Down Expand Up @@ -501,7 +501,7 @@ public UrlFragment urlFragment() {
public static final UrlParameterName QUERY = SpreadsheetCellQuery.QUERY;

public static final UrlParameterName VALUE_TYPE = UrlParameterName.with(VALUE_TYPE_STRING);

public UrlQueryString toUrlQueryString() {
UrlQueryString result = UrlQueryString.EMPTY;

Expand Down Expand Up @@ -590,7 +590,7 @@ public String toString() {
return this.urlFragment()
.toString();
}

// json.............................................................................................................

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public static SpreadsheetCellQuery parse(final String text) {

return with(
PARSER.parseText(
text,
PARSER_CONTEXT
).cast(SpreadsheetParserToken.class)
text,
PARSER_CONTEXT
).cast(SpreadsheetParserToken.class)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ private static Set<SpreadsheetLabelName> checkDeletedLabels(final Set<Spreadshee
private static Set<SpreadsheetLabelName> checkDeletedLabels0(final Set<SpreadsheetLabelName> deletedLabels) {
return Sets.immutable(deletedLabels);
}

// matchedCells............................................................................................................

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class SpreadsheetDeltaWindowSet extends AbstractSet<SpreadsheetCellRangeRe
@SuppressWarnings("lgtm[java/abstract-to-concrete-cast]")
static SpreadsheetDeltaWindowSet with(final Set<SpreadsheetCellRangeReference> window) {
return window instanceof SpreadsheetDeltaWindowSet ?
(SpreadsheetDeltaWindowSet)window :
(SpreadsheetDeltaWindowSet) window :

Check warning

Code scanning / CodeQL

Cast from abstract to concrete collection Warning

Set
is cast to the concrete type
SpreadsheetDeltaWindowSet
, losing abstraction.
new SpreadsheetDeltaWindowSet(
window.toArray(new SpreadsheetCellRangeReference[window.size()]) // TODO Array.clone.
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public WebEntity export(final SpreadsheetCellRange cells,
final Function<SpreadsheetCell, JsonNode> value;
final MediaType contentType;

switch(valueKind) {
switch (valueKind) {
case CELL:
value = (c) -> context.marshall(c)
.children()
Expand Down Expand Up @@ -104,11 +104,11 @@ public WebEntity export(final SpreadsheetCellRange cells,
break;
case PARSER:
value = (c) -> context.marshall(
c.parser()
.orElse(null)
).setName(
name(c)
);
c.parser()
.orElse(null)
).setName(
name(c)
);
contentType = SpreadsheetMediaTypes.JSON_PARSERS;
break;
case VALUE:
Expand Down
Loading

0 comments on commit f75e5ee

Please sign in to comment.