| Chunk |
|---|
| Conflicting content |
|---|
if (pos == -1) { // weird stuff
return;
}
<<<<<<< HEAD
// everythig after the "," is what we're supposed
// to run
// First make note of jars we got
File[] oldJar = new File(PMS.getConfiguration().getPluginDirectory()).listFiles();
=======
// Everything after the "," is what we're supposed to run
>>>>>>> 9cd5ec7a4e1d6d3d45baf7b26930434f61c239da
// Before we start external installers better save the config
PMS.getConfiguration().save();
ProcessBuilder pb = new ProcessBuilder(args.substring(pos + 1)); |
| Solution content |
|---|
if (pos == -1) { // weird stuff
return;
}
// Everything after the "," is what we're supposed to run
// First make note of jars we got
File[] oldJar = new File(PMS.getConfiguration().getPluginDirectory()).listFiles();
// Before we start external installers better save the config
PMS.getConfiguration().save();
ProcessBuilder pb = new ProcessBuilder(args.substring(pos + 1)); |
| File |
|---|
| DownloadPlugins.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
File f = new File(t);
>>>>>>> 9cd5ec7a4e1d6d3d45baf7b26930434f61c239da
env.put("PROFILE_PATH", PMS.getConfiguration().getProfileDirectory());
Process pid = pb.start();
InputStream is = pid.getInputStream();
<<<<<<< HEAD
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
StringBuilder sb = new StringBuilder();
while ((line = br.readLine()) != null) {
sb.append(line);
}
pid.waitFor();
File[] newJar = new File(PMS.getConfiguration().getPluginDirectory()).listFiles();
for (int i=0; i < newJar.length; i++) {
File f = newJar[i];
if (!f.getAbsolutePath().endsWith(".jar")) {
// skip non jar files
continue;
}
for (int j=0; j < oldJar.length; j++) {
if (f.getAbsolutePath().equals(oldJar[j].getAbsolutePath())) {
// old jar file break out, and set f to null to skip adding it
f = null;
break;
}
}
// if f is null this is an jar that is old
if (f != null) {
=======
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
StringBuilder sb = new StringBuilder();
while ((line = br.readLine()) != null) {
sb.append(line);
}
pid.waitFor();
String[] tmp = sb.toString().split(",");
for (int i = 0; i < tmp.length; i++) {
String t = tmp[i].trim();
if (t.contains(".jar")) {
jars.add(f.toURI().toURL());
}
} |
| Solution content |
|---|
env.put("PROFILE_PATH", PMS.getConfiguration().getProfileDirectory());
Process pid = pb.start();
InputStream is = pid.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
StringBuilder sb = new StringBuilder();
while ((line = br.readLine()) != null) {
sb.append(line);
}
pid.waitFor();
File[] newJar = new File(PMS.getConfiguration().getPluginDirectory()).listFiles();
for (int i=0; i < newJar.length; i++) {
File f = newJar[i];
if (!f.getAbsolutePath().endsWith(".jar")) {
// skip non jar files
continue;
}
for (int j=0; j < oldJar.length; j++) {
if (f.getAbsolutePath().equals(oldJar[j].getAbsolutePath())) {
// old jar file break out, and set f to null to skip adding it
f = null;
break;
}
}
// if f is null this is an jar that is old
if (f != null) {
jars.add(f.toURI().toURL());
}
} |
| File |
|---|
| DownloadPlugins.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Comment |
| For statement |
| If statement |
| Method invocation |
| Variable |
| While statement |