Skip to content

Commit

Permalink
Fix warnings in eclipse
Browse files Browse the repository at this point in the history
Close scanner instead of doing it with a warning
  • Loading branch information
TheJulianJES committed May 9, 2015
1 parent 71569ca commit 7a58188
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/main/java/appeng/services/version/VersionParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ private int parseRevision( String rawRevision )
{
assert PATTERN_VALID_REVISION.matcher( rawRevision ).matches();

final int revision = new Scanner( rawRevision ).useDelimiter( PATTERN_REVISION ).nextInt();
Scanner scanner = new Scanner( rawRevision );

final int revision = scanner.useDelimiter( PATTERN_REVISION ).nextInt();

scanner.close();

return revision;
}
Expand Down Expand Up @@ -124,7 +128,11 @@ private int parseBuild( String rawBuild )
{
assert PATTERN_NATURAL.matcher( rawBuild ).matches();

final int build = new Scanner( rawBuild ).useDelimiter( PATTERN_BUILD ).nextInt();
Scanner scanner = new Scanner( rawBuild );

final int build = scanner.useDelimiter( PATTERN_BUILD ).nextInt();

scanner.close();

return build;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/services/version/github/Release.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Template class for Gson to write values from the Json Object into an actual class
*/
@SuppressWarnings( "ALL" )
@SuppressWarnings( "all" )
public class Release
{
/**
Expand Down

0 comments on commit 7a58188

Please sign in to comment.