1.0.1: ThermalExpansion update-check fails

Sen-Mithrarin

New Member
Jul 29, 2019
129
0
0
Version:
1.0.1

What is the bug:
Found following in de-compiled class :
Code:
public static final String releaseURL = "https://raw.github.com/CoFH/ThermalExpansion/master/VERSION";
// ...
UpdateManager.registerUpdater(new UpdateManager(this, "https://raw.github.com/CoFH/ThermalExpansion/master/VERSION"));
Fails with HTTP-404 cause repo CoFH/ThermalExpansion isn't public / doesn't exists.
Found "correct" version-file on repo Adaptivity/ThermalExpansion so it forms the link https://raw.githubusercontent.com/Adaptivity/ThermalExpansion/master/VERSION but this also seems not the correct one as it is build B1.

Mod & Version:
ThermalExpansion-[1.7.10]4.0.0B5-13

Paste.feed-the-beast.com log:


Can it be repeated:
Yes cause it's an error in code.

Same errors also applies to RedstoneArsenal wich can be found on repo Tombenpotter/RedstoneArsenal just don't have any VERSION file at all.

de-compiled RA main class :
Code:
public static final String releaseURL = "https://raw.github.com/CoFH/RedstoneArsenal/master/VERSION";
//...
UpdateManager.registerUpdater(new UpdateManager(this, "https://raw.github.com/CoFH/RedstoneArsenal/master/VERSION"));

Known Fix:
First : correct the code to use the defined constant by change
Code:
UpdateManager.registerUpdater(new UpdateManager(this, "https://raw.github.com/CoFH/ThermalExpansion/master/VERSION"));
to
Code:
UpdateManager.registerUpdater(new UpdateManager(this, releaseURL));
"releaseURL" isn't used anywhere so there should be a compiler-warning about unused variable.

Second : correct "releaseURL" to point to the correct file. Either make /CoFH/ThermalExpansion/master/VERSION public or move it to a public repo.

Third : fix-up code as constants are writte as UPPER_CASE_WITH_UNDERSCORE > see Java conventions about how to name variables. So correct name should be RELEASE_URL.


IDEs like Netbeans or Eclipse have auto-refactoring for 1 and 3. Use it !
 

Darks_Anthro

New Member
Jul 29, 2019
7
0
0
Also....not sure if this relates but it's part of Thermal Expansion. Where are the item and fluid ducts?!