1
1
package control ;
2
2
3
- import java .awt .Desktop ;
4
- import java .io .IOException ;
5
- import java .net .URI ;
6
- import java .net .URISyntaxException ;
3
+ import java .awt .*;
4
+ import java .io .*;
5
+ import java .net .*;
7
6
8
- import javax .swing .JOptionPane ;
7
+ import javax .swing .* ;
9
8
10
- import org .apache .http .HttpResponse ;
11
- import org .apache .http .client .methods .HttpGet ;
12
- import org .apache .http .impl .client .DefaultHttpClient ;
13
- import org .apache .http .util .EntityUtils ;
14
- import org .apache .log4j .Logger ;
15
- import org .jsoup .Jsoup ;
16
- import org .jsoup .nodes .Document ;
17
- import org .jsoup .nodes .Element ;
18
- import org .jsoup .select .Elements ;
9
+ import org .apache .http .*;
10
+ import org .apache .http .client .methods .*;
11
+ import org .apache .http .impl .client .*;
12
+ import org .apache .http .util .*;
13
+ import org .apache .log4j .*;
14
+ import org .jsoup .*;
15
+ import org .jsoup .nodes .*;
16
+ import org .jsoup .select .*;
19
17
20
18
public class VersionValidator {
21
19
private final int YES = 0 ;
22
- private final String VERSION = "v0.5 .0" ;
20
+ private final String VERSION = "v1.0 .0" ;
23
21
private String LATEST_VERSION ;
24
22
private Logger LOGGER = Logger .getLogger (getClass ());
25
23
26
24
public boolean validate () {
27
25
28
26
DefaultHttpClient client = new DefaultHttpClient ();
29
- final HttpGet request = new HttpGet ("https://github.com/DeOldSax/iliasDownloaderTool/releases/latest" );
27
+ final HttpGet request = new HttpGet (
28
+ "https://github.com/DeOldSax/iliasDownloaderTool/releases/latest" );
30
29
HttpResponse response = null ;
31
30
try {
32
31
response = client .execute (request );
@@ -52,7 +51,8 @@ public boolean validate() {
52
51
return false ;
53
52
}
54
53
55
- int answer = JOptionPane .showOptionDialog (null , " Version Herunterladen?" , "Neue Version Verfügbar!" , JOptionPane .YES_NO_OPTION ,
54
+ int answer = JOptionPane .showOptionDialog (null , " Version Herunterladen?" ,
55
+ "Neue Version Verfügbar!" , JOptionPane .YES_NO_OPTION ,
56
56
JOptionPane .INFORMATION_MESSAGE , null , new Object [] { "Ja" , "Später" }, null );
57
57
if (answer == YES ) {
58
58
if (Desktop .isDesktopSupported ()) {
0 commit comments