mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Restored error message for reading .properties file
This commit is contained in:
@@ -2440,12 +2440,13 @@ public class Base {
|
||||
HashMap<String,String> outgoing = new HashMap<String,String>();
|
||||
if (inputFile.exists()) {
|
||||
String lines[] = PApplet.loadStrings(inputFile);
|
||||
readSettings(lines, outgoing);
|
||||
readSettings(inputFile.toString(), lines, outgoing);
|
||||
}
|
||||
return outgoing;
|
||||
}
|
||||
|
||||
static public void readSettings(String lines[], HashMap<String, String> exports) {
|
||||
static public void readSettings(String fileName, String lines[],
|
||||
HashMap<String, String> exports) {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
int hash = lines[i].indexOf('#');
|
||||
String line = (hash == -1) ?
|
||||
@@ -2454,8 +2455,8 @@ public class Base {
|
||||
|
||||
int equals = line.indexOf('=');
|
||||
if (equals == -1) {
|
||||
System.err.println("ignoring illegal line in properties file");
|
||||
//System.err.println("ignoring illegal line in " + inputFile);
|
||||
if (fileName != null)
|
||||
System.err.println("ignoring illegal line in " + fileName);
|
||||
System.err.println(" " + line);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ public class ContributionListing {
|
||||
System.arraycopy(lines, start, strings, 0, length);
|
||||
|
||||
HashMap<String,String> exports = new HashMap<String,String>();
|
||||
Base.readSettings(strings, exports);
|
||||
Base.readSettings(null, strings, exports);
|
||||
|
||||
Type kind = Contribution.Type.toType(type);
|
||||
outgoing.add(new AdvertisedContribution(kind, exports));
|
||||
|
||||
Reference in New Issue
Block a user