Skip to content

Commit

Permalink
修复无法弹出浏览器导致task没有执行的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Jan 18, 2018
1 parent 5f8dcc6 commit c4659ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions common/src/main/java/lee/study/down/util/OsUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.URI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OsUtil {

private static final Logger LOGGER = LoggerFactory.getLogger(OsUtil.class);

private static final String REG_HEAD = "reg add \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v ";
private static final String REG_TAIL = " /f";
private static final String PROXY_ENABLE_KEY = "ProxyEnable ";
Expand Down Expand Up @@ -74,10 +78,10 @@ public static void openBrowse(String url) {
URI uri = new URI(url);
desktop.browse(uri);
} catch (Exception e) {
throw new RuntimeException("can't open browse", e);
LOGGER.error("can't open browse", e);
}
} else {
throw new RuntimeException("don't support browse");
LOGGER.error("don't support browse");
}
}

Expand Down
2 changes: 1 addition & 1 deletion update/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>lee.study</groupId>
<artifactId>proxyee-down-update</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
<version>2.01</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion update/update.iml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: lee.study:proxyee-down-common:2.0" level="project" />
<orderEntry type="module" module-name="common" />
</component>
</module>

0 comments on commit c4659ab

Please sign in to comment.