Use SourceVersion.latestSupported() to avoid warning with JDK 7. #175

Merged
merged 1 commit into from Mar 2, 2013

Conversation

3 participants
@tbroyer
Collaborator

tbroyer commented Mar 1, 2013

When using dagger-compiler in a Java 7 project, the compiler used to issue
a "Supported source version 'RELEASE_6' from annotation processor
'dagger.internal.codegen.InjectProcessor' less than -source '1.7'" warning.

See also http://stackoverflow.com/a/8188860/116472 and hibernate/hibernate-metamodelgen@d8ce150, among others (I trust JBoss more than others about using latestSupported() rather than latest(), maybe I'm wrong).

@JakeWharton

View changes

compiler/src/main/java/dagger/internal/codegen/FullGraphProcessor.java
public final class FullGraphProcessor extends AbstractProcessor {
private final Set<String> delayedModuleNames = new LinkedHashSet<String>();
+ @Override
+ public SourceVersion getSupportedSourceVersion() {

This comment has been minimized.

Show comment Hide comment
@JakeWharton

JakeWharton Mar 1, 2013

Collaborator

Annotations on same line as method declaration.

@JakeWharton

JakeWharton Mar 1, 2013

Collaborator

Annotations on same line as method declaration.

This comment has been minimized.

Show comment Hide comment
@tbroyer

tbroyer Mar 1, 2013

Collaborator

Oops! fixed

@tbroyer

tbroyer Mar 1, 2013

Collaborator

Oops! fixed

Use SourceVersion.latestSupported() to avoid warning with JDK 7.
When using dagger-compiler in a Java 7 project, the compiler used to issue
a "Supported source version 'RELEASE_6' from annotation processor
'dagger.internal.codegen.InjectProcessor' less than -source '1.7'" warning.

swankjesse added a commit that referenced this pull request Mar 2, 2013

Merge pull request #175 from tbroyer/supportedsourceversion
Use SourceVersion.latestSupported() to avoid warning with JDK 7.

@swankjesse swankjesse merged commit 8ca183a into square:master Mar 2, 2013

1 check passed

default The Travis build passed
Details

@tbroyer tbroyer deleted the tbroyer:supportedsourceversion branch Mar 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment