mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (warnings; formatting)
GitOrigin-RevId: 7a6d2b0ef8b5bd41e95b7c5b3a8345c959c96e18
This commit is contained in:
committed by
intellij-monorepo-bot
parent
435b587612
commit
11531c1fd3
+6
-14
@@ -9,7 +9,6 @@ import com.intellij.openapi.util.NotNullLazyValue;
|
||||
import com.intellij.openapi.util.NullableLazyValue;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.xmlb.annotations.Tag;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -102,14 +101,11 @@ final class WslDistributionDescriptor {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WslDistributionDescriptor{" +
|
||||
"id='" + myId + '\'' +
|
||||
", msId='" + myMsId + '\'' +
|
||||
'}';
|
||||
return "WslDistributionDescriptor{id='" + myId + "', msId='" + myMsId + "'}";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mount point for current distribution. Default value of {@code /mnt/} may be overriden with {@code /etc/wsl.conf}
|
||||
* @return the mount point for current distribution. Default value of {@code /mnt/} may be overridden with {@code /etc/wsl.conf}
|
||||
* @apiNote caches value per IDE run. Meaning - reconfiguring of this option in WSL requires IDE restart.
|
||||
*/
|
||||
final @NotNull @NlsSafe String getMntRoot() {
|
||||
@@ -145,8 +141,7 @@ final class WslDistributionDescriptor {
|
||||
return WSLDistribution.DEFAULT_WSL_MNT_ROOT;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private String readWslOutputLine(WSLCommandLineOptions options, List<@NonNls String> command) {
|
||||
private @Nullable String readWslOutputLine(WSLCommandLineOptions options, List<String> command) {
|
||||
List<String> pwdOutputLines = readWSLOutput(options, command);
|
||||
if (pwdOutputLines == null) return null;
|
||||
if (pwdOutputLines.size() != 1) {
|
||||
@@ -159,8 +154,7 @@ final class WslDistributionDescriptor {
|
||||
return pwdOutputLines.get(0).trim();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private List<String> readWSLOutput(WSLCommandLineOptions options, List<@NonNls String> command) {
|
||||
private @Nullable List<String> readWSLOutput(WSLCommandLineOptions options, List<String> command) {
|
||||
WSLDistribution distribution = WSLUtil.getDistributionById(getId());
|
||||
if (distribution == null) return null;
|
||||
|
||||
@@ -184,13 +178,11 @@ final class WslDistributionDescriptor {
|
||||
return output.getStdoutLines();
|
||||
}
|
||||
|
||||
@NonNls @Nullable
|
||||
private String computeUserHome() {
|
||||
private @Nullable String computeUserHome() {
|
||||
return getEnvironmentVariable("HOME");
|
||||
}
|
||||
|
||||
@NonNls @Nullable
|
||||
String getEnvironmentVariable(String name) {
|
||||
@Nullable String getEnvironmentVariable(String name) {
|
||||
return readWslOutputLine(new WSLCommandLineOptions().withTimeout(60_000), Arrays.asList("printenv", name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ public final class IoTestUtil {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
catch (IOException e) {
|
||||
//noinspection SSBasedInspection
|
||||
//noinspection RedundantSuppression;SSBasedInspection
|
||||
Logger.getInstance("#com.intellij.openapi.util.io.IoTestUtil").debug(e);
|
||||
runCommand("cmd", "/C", "mklink", link.toString(), target.getFileName().toString());
|
||||
return Boolean.FALSE;
|
||||
@@ -390,7 +390,7 @@ public final class IoTestUtil {
|
||||
}
|
||||
}
|
||||
catch (Throwable t) {
|
||||
//noinspection SSBasedInspection
|
||||
//noinspection RedundantSuppression;SSBasedInspection
|
||||
Logger.getInstance("#com.intellij.openapi.util.io.IoTestUtil").debug(t);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user