-
Notifications
You must be signed in to change notification settings - Fork 61
Fixed ConcurrentModificationException on a map and tweeked some options. #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c0b88ba
1d16781
4d538e2
cfa2f13
1ccef57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -29,6 +29,7 @@ | |||||||||||||||
import java.nio.file.Paths; | ||||||||||||||||
import java.util.ArrayList; | ||||||||||||||||
import java.util.Arrays; | ||||||||||||||||
import java.util.HashMap; | ||||||||||||||||
import java.util.HashSet; | ||||||||||||||||
import java.util.Iterator; | ||||||||||||||||
import java.util.List; | ||||||||||||||||
|
@@ -140,6 +141,7 @@ private Map<String, String> getCompilerArguments(CompilerConfiguration config) { | |||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
compilerArguments = config.getCustomCompilerArgumentsAsMap(); | ||||||||||||||||
Map<String, String> ca2 = new HashMap<String, String>(); | ||||||||||||||||
|
||||||||||||||||
Iterator<String> i = compilerArguments.keySet().iterator(); | ||||||||||||||||
|
||||||||||||||||
|
@@ -151,12 +153,15 @@ private Map<String, String> getCompilerArguments(CompilerConfiguration config) { | |||||||||||||||
i.remove(); | ||||||||||||||||
String k = arr[0]; | ||||||||||||||||
v = arr[1]; | ||||||||||||||||
compilerArguments.put(k, v); | ||||||||||||||||
// compilerArguments.put(k, v); | ||||||||||||||||
ca2.put(k, v); | ||||||||||||||||
if (config.isDebug()) { | ||||||||||||||||
System.out.println("transforming argument from " + orig + " to " + k + " = [" + v + "]"); | ||||||||||||||||
System.out.println( | ||||||||||||||||
"internal splitting of argument '" + orig + "' to key '" + k + "', value '" + v + "'"); | ||||||||||||||||
} | ||||||||||||||||
} | ||||||||||||||||
} | ||||||||||||||||
compilerArguments.putAll(ca2); | ||||||||||||||||
|
||||||||||||||||
config.setCustomCompilerArgumentsAsMap(compilerArguments); | ||||||||||||||||
|
||||||||||||||||
|
@@ -389,11 +394,12 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
throws CompilerException { | ||||||||||||||||
List<String> args = new ArrayList<>(); | ||||||||||||||||
|
||||||||||||||||
if (config.isDebug()) { | ||||||||||||||||
args.add("/debug+"); | ||||||||||||||||
} else { | ||||||||||||||||
args.add("/debug-"); | ||||||||||||||||
} | ||||||||||||||||
// plugin parameter is no the same as the compiler option! so replaced | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Corrected spelling of 'no' to 'not'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||
// if (config.isDebug()) { | ||||||||||||||||
// args.add("/debug+"); | ||||||||||||||||
// } else { | ||||||||||||||||
// args.add("/debug-"); | ||||||||||||||||
// } | ||||||||||||||||
Comment on lines
+397
to
+402
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Consider removing commented-out code rather than leaving it in the codebase. If this code might be needed for reference, document why it was removed in a comment.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||
|
||||||||||||||||
// config.isShowWarnings() | ||||||||||||||||
// config.getSourceVersion() | ||||||||||||||||
|
@@ -433,12 +439,14 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
} | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
// TODO: include all user compiler arguments and not only some! | ||||||||||||||||
|
||||||||||||||||
Map<String, String> compilerArguments = getCompilerArguments(config); | ||||||||||||||||
|
||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
// Main class | ||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
|
||||||||||||||||
Map<String, String> compilerArguments = getCompilerArguments(config); | ||||||||||||||||
|
||||||||||||||||
String mainClass = compilerArguments.get("-main"); | ||||||||||||||||
|
||||||||||||||||
if (!StringUtils.isEmpty(mainClass)) { | ||||||||||||||||
|
@@ -457,7 +465,17 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
// Nowarn option | ||||||||||||||||
// Debug option (full, pdbonly...) | ||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
|
||||||||||||||||
String debug = compilerArguments.get("-debug"); | ||||||||||||||||
|
||||||||||||||||
if (!StringUtils.isEmpty(debug)) { | ||||||||||||||||
args.add("/debug:" + debug); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
// Nowarn option (w#1,w#2...) | ||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
|
||||||||||||||||
String nowarn = compilerArguments.get("-nowarn"); | ||||||||||||||||
|
@@ -489,7 +507,7 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
// Target - type of assembly to produce, lib,exe,winexe etc... | ||||||||||||||||
// Target - type of assembly to produce: library,exe,winexe... | ||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
|
||||||||||||||||
String target = compilerArguments.get("-target"); | ||||||||||||||||
|
@@ -505,7 +523,7 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
String nologo = compilerArguments.get("-nologo"); | ||||||||||||||||
|
||||||||||||||||
if (!StringUtils.isEmpty(nologo)) { | ||||||||||||||||
if (!StringUtils.isEmpty(nologo) && !"false".equals(nologo.toLowerCase())) { | ||||||||||||||||
args.add("/nologo"); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
|
@@ -514,7 +532,7 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
String unsafe = compilerArguments.get("-unsafe"); | ||||||||||||||||
|
||||||||||||||||
if (!StringUtils.isEmpty(unsafe) && unsafe.equals("true")) { | ||||||||||||||||
if (!StringUtils.isEmpty(unsafe) && "true".equals(unsafe.toLowerCase())) { | ||||||||||||||||
args.add("/unsafe"); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
|
@@ -532,8 +550,8 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
String utf8output = compilerArguments.get("-utf8output"); | ||||||||||||||||
|
||||||||||||||||
if (!StringUtils.isEmpty(utf8output)) { | ||||||||||||||||
args.add("/utf8output:"); | ||||||||||||||||
if (!StringUtils.isEmpty(utf8output) && !"false".equals(utf8output)) { | ||||||||||||||||
args.add("/utf8output"); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
// ---------------------------------------------------------------------- | ||||||||||||||||
|
@@ -548,6 +566,10 @@ private String[] buildCompilerArguments(CompilerConfiguration config, String[] s | |||||||||||||||
args.add(sourceFile); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
if (config.isDebug()) { | ||||||||||||||||
System.out.println("built compiler arguments:" + args); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
return args.toArray(new String[args.size()]); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
|
@@ -759,7 +781,7 @@ protected static Set<String> getSourceFilesForSourceRoot(CompilerConfiguration c | |||||||||||||||
|
||||||||||||||||
if (excludes != null && !excludes.isEmpty()) { | ||||||||||||||||
String[] exclStrs = excludes.toArray(new String[excludes.size()]); | ||||||||||||||||
scanner.setIncludes(exclStrs); | ||||||||||||||||
scanner.setExcludes(exclStrs); | ||||||||||||||||
This comment was marked as resolved.
Sorry, something went wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do too but did not find a way to create a second pull request while the first one was still opened...
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong. |
||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
scanner.scan(); | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider removing commented-out code rather than leaving it in the codebase.
Copilot uses AI. Check for mistakes.