Skip to content

Commit

Permalink
Change AutoServiceProcessor to not use \ as a separator in `META-IN…
Browse files Browse the repository at this point in the history
…F/services/` on Windows. It doesn't work.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=60653143
  • Loading branch information
cgruber committed Feb 27, 2014
1 parent 0c06a23 commit 4ccfabf
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -15,7 +15,6 @@
*/
package com.google.auto.service.processor;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
Expand Down Expand Up @@ -60,8 +59,6 @@
*/
@SupportedOptions({ "debug", "verify" })
public class AutoServiceProcessor extends AbstractProcessor {
private static final String SERVICE_DIR = "META-INF" + File.separator + "services"
+ File.separator;

/**
* Maps the class names of service provider interfaces to the
Expand Down Expand Up @@ -159,7 +156,7 @@ private void generateConfigFiles() {
Filer filer = processingEnv.getFiler();

for (String providerInterface : providers.keySet()) {
String resourceFile = SERVICE_DIR + providerInterface;
String resourceFile = "META-INF/services/" + providerInterface;
log("Working on resource file: " + resourceFile);
try {
SortedSet<String> allServices = Sets.newTreeSet();
Expand Down Expand Up @@ -296,4 +293,4 @@ private void error(String msg, Element element, AnnotationMirror annotation) {
private void fatalError(String msg) {
processingEnv.getMessager().printMessage(Kind.ERROR, "FATAL ERROR: " + msg);
}
}
}

0 comments on commit 4ccfabf

Please sign in to comment.