Skip to content

Java 9 - RemoveUnusedImports needs "-source 9" too #181

@sormuras

Description

@sormuras

Analogue to #176 the "import fixer" needs the -source 9 as well.

Stacktrace:

com.google.googlejavaformat.FormattingError: 470:35:
  error: private interface methods are not supported in -source 1.8
  (use -source 9 or higher to enable private interface methods)

	at com.google.googlejavaformat.FormattingError.fromJavacDiagnostics(FormattingError.java:46)
	at com.google.googlejavaformat.java.RemoveUnusedImports.parse(RemoveUnusedImports.java:241)
	at com.google.googlejavaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:198)
	at com.google.googlejavaformat.java.FormatFileCallable.fixImports(FormatFileCallable.java:54)
	at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:47)
	at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:27)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.base/java.lang.Thread.run(Thread.java:844)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions