Skip to content

Commit

Permalink
Convert tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
guw committed Jun 14, 2024
1 parent c3fd232 commit 3ecccba
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static ArrayList<Classpath> normalize(ArrayList<Classpath> classpaths) {
protected boolean annotationsFromClasspath; // should annotation files be read from the classpath (vs. explicit separate path)?
private static HashMap<File, Classpath> JRT_CLASSPATH_CACHE = null;
protected Map<String,Classpath> moduleLocations = new HashMap<>();
private Consumer<NameEnvironmentAnswer> nameEnvironmentAnswerListener; // a listener for findType* answers
private Consumer<NameEnvironmentAnswer> nameEnvironmentAnswerListener; // a listener for findType* answers

/** Tasks resulting from --add-reads or --add-exports command line options. */
Map<String,UpdatesByKind> moduleUpdates = new HashMap<>();
Expand Down Expand Up @@ -432,7 +432,7 @@ public void cleanup() {
private static String convertPathSeparators(String path) {
return File.separatorChar == '/'
? path.replace('\\', '/')
: path.replace('/', '\\');
: path.replace('/', '\\');
}
@SuppressWarnings("resource") // don't close classpathEntry.zipFile, which we don't own
private NameEnvironmentAnswer findClass(String qualifiedTypeName, char[] typeName, boolean asBinaryOnly, /*NonNull*/char[] moduleName) {
Expand All @@ -450,7 +450,7 @@ private NameEnvironmentAnswer findClass(String qualifiedTypeName, char[] typeNam
}
answer.setBinaryType(ExternalAnnotationDecorator.create(answer.getBinaryType(), classpathEntry.getPath(),
qualifiedTypeName, zip));
return notify(answer);
return notify(answer);
} catch (IOException e) {
// ignore broken entry, keep searching
} finally {
Expand All @@ -464,17 +464,17 @@ private NameEnvironmentAnswer findClass(String qualifiedTypeName, char[] typeNam
// globally configured (annotationsFromClasspath), but no .eea found, decorate in order to answer NO_EEA_FILE:
answer.setBinaryType(new ExternalAnnotationDecorator(answer.getBinaryType(), null));
}
return notify(answer);
return notify(answer);
}

private NameEnvironmentAnswer notify(NameEnvironmentAnswer answer) {
if(answer == null) {
return answer;
}
Consumer<NameEnvironmentAnswer> listener = this.nameEnvironmentAnswerListener;
if(listener != null) {
listener.accept(answer);
}
if(answer == null) {
return answer;
}
Consumer<NameEnvironmentAnswer> listener = this.nameEnvironmentAnswerListener;
if(listener != null) {
listener.accept(answer);
}
return answer;
}

Expand Down Expand Up @@ -773,8 +773,8 @@ public void applyModuleUpdates(IUpdatableModule compilerModule, IUpdatableModule
* @return a previously set listener (may be <code>null</code>)
*/
public Consumer<NameEnvironmentAnswer> setNameEnvironmentAnswerListener(Consumer<NameEnvironmentAnswer> nameEnvironmentAnswerListener) {
Consumer<NameEnvironmentAnswer> existing = this.nameEnvironmentAnswerListener;
this.nameEnvironmentAnswerListener = nameEnvironmentAnswerListener;
return existing;
Consumer<NameEnvironmentAnswer> existing = this.nameEnvironmentAnswerListener;
this.nameEnvironmentAnswerListener = nameEnvironmentAnswerListener;
return existing;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1288,19 +1288,19 @@ public void startLoggingSource(CompilationResult compilationResult) {
ICompilationUnit compilationUnit = compilationResult.compilationUnit;
HashMap<String, Object> parameters = new HashMap<>();
if (compilationUnit != null) {
char[] fileName = compilationUnit.getFileName();
File f = new File(new String(fileName));
if (fileName != null) {
parameters.put(Logger.PATH, f.getAbsolutePath());
}
char[][] packageName = compilationResult.packageName;
if (packageName != null) {
parameters.put(
Logger.PACKAGE,
new String(CharOperation.concatWith(packageName, File.separatorChar)));
}
CompilationUnit unit = (CompilationUnit) compilationUnit;
String destinationPath = unit.destinationPath;
char[] fileName = compilationUnit.getFileName();
File f = new File(new String(fileName));
if (fileName != null) {
parameters.put(Logger.PATH, f.getAbsolutePath());
}
char[][] packageName = compilationResult.packageName;
if (packageName != null) {
parameters.put(
Logger.PACKAGE,
new String(CharOperation.concatWith(packageName, File.separatorChar)));
}
CompilationUnit unit = (CompilationUnit) compilationUnit;
String destinationPath = unit.destinationPath;
if (destinationPath == null) {
destinationPath = this.main.destinationPath;
}
Expand Down Expand Up @@ -1612,7 +1612,7 @@ protected void addNewEntry(ArrayList<FileSystem.Classpath> paths, String current
}
}
if (rulesOK) {
accessRuleSet = new AccessRuleSet(accessRules, AccessRestriction.COMMAND_LINE, currentClasspathName);
accessRuleSet = new AccessRuleSet(accessRules, AccessRestriction.COMMAND_LINE, currentClasspathName);
} else {
if (currentClasspathName.length() != 0) {
// we go on anyway
Expand Down Expand Up @@ -3346,7 +3346,7 @@ public String extractDestinationPathFromSourceFile(CompilationResult result) {
* Answer the component to which will be handed back compilation results from the compiler
*/
public ICompilerRequestor getBatchRequestor() {
return new BatchCompilerRequestor(this);
return new BatchCompilerRequestor(this);
}
/*
* Build the set of compilation source units
Expand Down Expand Up @@ -3479,8 +3479,8 @@ public IProblemFactory getProblemFactory() {
* External API
*/
protected ArrayList<Classpath> handleBootclasspath(ArrayList<String> bootclasspaths, String customEncoding) {
final int bootclasspathsSize;
ArrayList<Classpath> result = new ArrayList<>(DEFAULT_SIZE_CLASSPATH);
final int bootclasspathsSize;
ArrayList<Classpath> result = new ArrayList<>(DEFAULT_SIZE_CLASSPATH);
if ((bootclasspaths != null)
&& ((bootclasspathsSize = bootclasspaths.size()) != 0)) {
result = new ArrayList<>(bootclasspathsSize);
Expand Down Expand Up @@ -3692,7 +3692,7 @@ public void multipleClasspathSections(String jarFilePath) {
* External API
*/
protected ArrayList<FileSystem.Classpath> handleEndorseddirs(ArrayList<String> endorsedDirClasspaths) {
final File javaHome = getJavaHome();
final File javaHome = getJavaHome();
/*
* Feed endorsedDirClasspath according to:
* - -endorseddirs first if present;
Expand Down Expand Up @@ -3755,7 +3755,7 @@ protected ArrayList<FileSystem.Classpath> handleEndorseddirs(ArrayList<String> e
* Handle extdirs processing
*/
protected ArrayList<FileSystem.Classpath> handleExtdirs(ArrayList<String> extdirsClasspaths) {
final File javaHome = getJavaHome();
final File javaHome = getJavaHome();

/*
* Feed extDirClasspath according to:
Expand Down Expand Up @@ -3996,7 +3996,7 @@ private void handleErrorOrWarningToken(String token, boolean isEnabling, int sev
}
}
this.options.put(CompilerOptions.OPTION_ReportMissingEnumCaseDespiteDefault,
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
return;
} else if (token.equals("emptyBlock")) {//$NON-NLS-1$
setSeverity(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, severity, isEnabling);
Expand Down
Loading

0 comments on commit 3ecccba

Please sign in to comment.