Skip to content

Commit

Permalink
make 'auto' the new default
Browse files Browse the repository at this point in the history
and also addClasspathDefault(ServiceProvider.class) for 'auto' and 'annotation'

Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
  • Loading branch information
chrisrueger committed Oct 7, 2024
1 parent 16b43b3 commit bca02d0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public boolean analyzeJar(Analyzer analyzer) throws Exception {
return false;
case METAINF_SERVICES_STRATEGY_AUTO : {
analyzer.addClasspathDefault(ServiceProvider.class);
break;
}
case METAINF_SERVICES_STRATEGY_ANNOTATION : {
analyzer.addClasspathDefault(ServiceProvider.class);
// break;
}
}

Expand Down Expand Up @@ -80,6 +85,6 @@ private void doAnnotationsforMetaInf(Analyzer analyzer, Implementation impl, Str
}

private String strategy(Analyzer analyzer) {
return analyzer.getProperty(METAINF_SERVICES, METAINF_SERVICES_STRATEGY_ANNOTATION);
return analyzer.getProperty(METAINF_SERVICES, METAINF_SERVICES_STRATEGY_AUTO);
}
}

0 comments on commit bca02d0

Please sign in to comment.