From d6f29464c62f73b2830f506902ff67e39ac3e1e2 Mon Sep 17 00:00:00 2001 From: thatsIch Date: Thu, 28 May 2015 21:20:01 +0200 Subject: [PATCH] Fixes #1521: Renames release to stable --- .../java/appeng/services/version/Channel.java | 22 +++++++++++++++++-- .../services/version/DoNotCheckVersion.java | 20 ++++++++++++++++- .../java/appeng/services/version/Version.java | 20 ++++++++++++++++- .../version/VersionCheckerConfig.java | 20 ++++++++++++++++- .../services/version/VersionParser.java | 22 +++++++++++++++++-- 5 files changed, 97 insertions(+), 7 deletions(-) diff --git a/src/main/java/appeng/services/version/Channel.java b/src/main/java/appeng/services/version/Channel.java index 6b37b5ea..397ed836 100644 --- a/src/main/java/appeng/services/version/Channel.java +++ b/src/main/java/appeng/services/version/Channel.java @@ -1,13 +1,31 @@ +/* + * This file is part of Applied Energistics 2. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. + * + * Applied Energistics 2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Applied Energistics 2 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Applied Energistics 2. If not, see . + */ + package appeng.services.version; /** - * Represents the release channel of Applied Energistics. The mod is either in Alpha, Beta or Release channel. + * Represents the release channel of Applied Energistics. The mod is either in Alpha, Beta or Stable channel. * Any more might be confusing to the end-user */ public enum Channel { Alpha, Beta, - Release + Stable } diff --git a/src/main/java/appeng/services/version/DoNotCheckVersion.java b/src/main/java/appeng/services/version/DoNotCheckVersion.java index c92f43d6..455f7414 100644 --- a/src/main/java/appeng/services/version/DoNotCheckVersion.java +++ b/src/main/java/appeng/services/version/DoNotCheckVersion.java @@ -1,3 +1,21 @@ +/* + * This file is part of Applied Energistics 2. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. + * + * Applied Energistics 2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Applied Energistics 2 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Applied Energistics 2. If not, see . + */ + package appeng.services.version; @@ -8,7 +26,7 @@ public final class DoNotCheckVersion extends BaseVersion { public DoNotCheckVersion() { - super( Integer.MAX_VALUE, Channel.Release, Integer.MAX_VALUE ); + super( Integer.MAX_VALUE, Channel.Stable, Integer.MAX_VALUE ); } @Override diff --git a/src/main/java/appeng/services/version/Version.java b/src/main/java/appeng/services/version/Version.java index 94f2ae60..125f254a 100644 --- a/src/main/java/appeng/services/version/Version.java +++ b/src/main/java/appeng/services/version/Version.java @@ -1,3 +1,21 @@ +/* + * This file is part of Applied Energistics 2. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. + * + * Applied Energistics 2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Applied Energistics 2 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Applied Energistics 2. If not, see . + */ + package appeng.services.version; @@ -24,7 +42,7 @@ public interface Version /** * A version is never if these criteria are met: * if the current revision is higher than the compared revision OR - * if revision are equal and the current channel is higher than the compared channel (Release > Beta > Alpha) OR + * if revision are equal and the current channel is higher than the compared channel (Stable > Beta > Alpha) OR * if revision, channel are equal and the build is higher than the compared build * * @return true if criteria are met diff --git a/src/main/java/appeng/services/version/VersionCheckerConfig.java b/src/main/java/appeng/services/version/VersionCheckerConfig.java index d9758e26..5282bc79 100644 --- a/src/main/java/appeng/services/version/VersionCheckerConfig.java +++ b/src/main/java/appeng/services/version/VersionCheckerConfig.java @@ -1,3 +1,21 @@ +/* + * This file is part of Applied Energistics 2. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. + * + * Applied Energistics 2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Applied Energistics 2 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Applied Energistics 2. If not, see . + */ + package appeng.services.version; @@ -41,7 +59,7 @@ public final class VersionCheckerConfig this.lastCheck = this.config.getString( "lastCheck", "cache", "0", "The number of milliseconds since January 1, 1970, 00:00:00 GMT of the last successful check." ); this.interval = this.config.getInt( "interval", "cache", DEFAULT_INTERVAL_HOURS, MIN_INTERVAL_HOURS, MAX_INTERVAL_HOURS, "Waits as many hours, until it checks again." ); - this.level = this.config.getString( "level", "channel", "Beta", "Determines the channel level which should be checked for updates. Can be either Release, Beta or Alpha." ); + this.level = this.config.getString( "level", "channel", "Beta", "Determines the channel level which should be checked for updates. Can be either Stable, Beta or Alpha." ); this.shouldNotifyPlayer = this.config.getBoolean( "notify", "client", true, "If true, the player is getting a notification, that a new version is available." ); this.shouldPostChangelog = this.config.getBoolean( "changelog", "client", true, "If true, the player is getting a notification including changelog. Only happens if notification are enabled." ); diff --git a/src/main/java/appeng/services/version/VersionParser.java b/src/main/java/appeng/services/version/VersionParser.java index b0497701..ef219250 100644 --- a/src/main/java/appeng/services/version/VersionParser.java +++ b/src/main/java/appeng/services/version/VersionParser.java @@ -1,3 +1,21 @@ +/* + * This file is part of Applied Energistics 2. + * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. + * + * Applied Energistics 2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Applied Energistics 2 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Applied Energistics 2. If not, see . + */ + package appeng.services.version; @@ -96,7 +114,7 @@ public final class VersionParser } /** - * A channel is atm either one of {@link Channel#Alpha}, {@link Channel#Beta} or {@link Channel#Release} + * A channel is atm either one of {@link Channel#Alpha}, {@link Channel#Beta} or {@link Channel#Stable} * * @param rawChannel String containing the channel * @@ -104,7 +122,7 @@ public final class VersionParser */ private Channel parseChannel( String rawChannel ) { - assert rawChannel.equalsIgnoreCase( Channel.Alpha.name() ) || rawChannel.equalsIgnoreCase( Channel.Beta.name() ) || rawChannel.equalsIgnoreCase( Channel.Release.name() ); + assert rawChannel.equalsIgnoreCase( Channel.Alpha.name() ) || rawChannel.equalsIgnoreCase( Channel.Beta.name() ) || rawChannel.equalsIgnoreCase( Channel.Stable.name() ); for( Channel channel : Channel.values() ) {