Merge branch '2.0.x'
This commit is contained in:
@@ -109,8 +109,8 @@ public class DefaultLaunchScript implements LaunchScript {
|
||||
}
|
||||
}
|
||||
else {
|
||||
value = (defaultValue == null ? matcher.group(0)
|
||||
: defaultValue.substring(1));
|
||||
value = (defaultValue != null ? defaultValue.substring(1)
|
||||
: matcher.group(0));
|
||||
}
|
||||
matcher.appendReplacement(expanded, value.replace("$", "\\$"));
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
int read = (this.headerStream == null ? -1 : this.headerStream.read());
|
||||
int read = (this.headerStream != null ? this.headerStream.read() : -1);
|
||||
if (read != -1) {
|
||||
this.headerStream = null;
|
||||
return read;
|
||||
@@ -371,8 +371,8 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
int read = (this.headerStream == null ? -1
|
||||
: this.headerStream.read(b, off, len));
|
||||
int read = (this.headerStream != null ? this.headerStream.read(b, off, len)
|
||||
: -1);
|
||||
if (read != -1) {
|
||||
this.headerStream = null;
|
||||
return read;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Library {
|
||||
* @param unpackRequired if the library needs to be unpacked before it can be used
|
||||
*/
|
||||
public Library(String name, File file, LibraryScope scope, boolean unpackRequired) {
|
||||
this.name = (name == null ? file.getName() : name);
|
||||
this.name = (name != null ? name : file.getName());
|
||||
this.file = file;
|
||||
this.scope = scope;
|
||||
this.unpackRequired = unpackRequired;
|
||||
|
||||
@@ -452,8 +452,8 @@ public abstract class MainClassFinder {
|
||||
"Unable to find a single main class from the following candidates "
|
||||
+ matchingMainClasses);
|
||||
}
|
||||
return matchingMainClasses.isEmpty() ? null
|
||||
: matchingMainClasses.iterator().next().getName();
|
||||
return (matchingMainClasses.isEmpty() ? null
|
||||
: matchingMainClasses.iterator().next().getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user