Fix warnings in eclipse
Close scanner instead of doing it with a warning Make the scanner final..
This commit is contained in:
parent
064acc21ee
commit
34f78a7ce4
|
@ -86,7 +86,11 @@ public final class VersionParser
|
|||
{
|
||||
assert PATTERN_VALID_REVISION.matcher( rawRevision ).matches();
|
||||
|
||||
final int revision = new Scanner( rawRevision ).useDelimiter( PATTERN_REVISION ).nextInt();
|
||||
final Scanner scanner = new Scanner( rawRevision );
|
||||
|
||||
final int revision = scanner.useDelimiter( PATTERN_REVISION ).nextInt();
|
||||
|
||||
scanner.close();
|
||||
|
||||
return revision;
|
||||
}
|
||||
|
@ -124,7 +128,11 @@ public final class VersionParser
|
|||
{
|
||||
assert PATTERN_NATURAL.matcher( rawBuild ).matches();
|
||||
|
||||
final int build = new Scanner( rawBuild ).useDelimiter( PATTERN_BUILD ).nextInt();
|
||||
final Scanner scanner = new Scanner( rawBuild );
|
||||
|
||||
final int build = scanner.useDelimiter( PATTERN_BUILD ).nextInt();
|
||||
|
||||
scanner.close();
|
||||
|
||||
return build;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ package appeng.services.version.github;
|
|||
/**
|
||||
* Template class for Gson to write values from the Json Object into an actual class
|
||||
*/
|
||||
@SuppressWarnings( "ALL" )
|
||||
@SuppressWarnings( "all" )
|
||||
public class Release
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue