A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/google/google-java-format/commit/b769e812a052d7cff4a2d86eff4981a5d358ee2d below:

Tolerate extra semi-colons in import lists · google/google-java-format@b769e81 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+25

-0

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+25

-0

lines changed Original file line number Diff line number Diff line change

@@ -346,6 +346,10 @@ private ImportsAndIndex scanImports(int i) throws FormatterException {

346 346

i++;

347 347

}

348 348

}

349 +

while (tokenAt(i).equals(";")) {

350 +

// Extra semicolons are not allowed by the JLS but are accepted by javac.

351 +

i++;

352 +

}

349 353

imports.add(new Import(importedName, trailing.toString(), isStatic));

350 354

// Remember the position just after the import we just saw, before skipping blank lines.

351 355

// If the next thing after the blank lines is not another import then we don't want to

Original file line number Diff line number Diff line change

@@ -800,6 +800,27 @@ public static Collection<Object[]> parameters() {

800 800

"public class Blim {}",

801 801

},

802 802

},

803 +

{

804 +

{

805 +

"package p;",

806 +

"",

807 +

"import java.lang.Bar;",

808 +

"import java.lang.Baz;",

809 +

";",

810 +

"import java.lang.Foo;",

811 +

"",

812 +

"interface Test {}",

813 +

},

814 +

{

815 +

"package p;",

816 +

"",

817 +

"import java.lang.Bar;",

818 +

"import java.lang.Baz;",

819 +

"import java.lang.Foo;",

820 +

"",

821 +

"interface Test {}",

822 +

}

823 +

}

803 824

};

804 825

ImmutableList.Builder<Object[]> builder = ImmutableList.builder();

805 826

Arrays.stream(inputsOutputs).forEach(input -> builder.add(createRow(input)));

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4