triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.35k stars 399 forks source link

DownloadFileParser#optEnum:77 - java.lang.IllegalArgumentException #12859

Open tripleabuilderbot opened 2 months ago

tripleabuilderbot commented 2 months ago

User Description

Clicked on "Download Maps", got this error.

Log Message

No enum constant games.strategy.engine.framework.map.download.DownloadFileDescription.MapCategory.Experimental

TripleA Version

2.6.14780

Java Version

11.0.19

Operating System

Windows 10

Heap Size

2028M

Stack Trace

Exception: java.lang.IllegalArgumentException No enum constant games.strategy.engine.framework.map.download.DownloadFileDescription.MapCategory.Experimental
java.lang.Exception
    at java.base/java.lang.Enum.valueOf(Enum.java:240)
    at games.strategy.engine.framework.map.download.DownloadFileParser.optEnum(DownloadFileParser.java:77)
    at games.strategy.engine.framework.map.download.DownloadFileParser.lambda$parse$0(DownloadFileParser.java:54)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at games.strategy.engine.framework.map.download.DownloadFileParser.parse(DownloadFileParser.java:37)
    at games.strategy.engine.framework.map.download.ContentReader.downloadAndApplyAction(ContentReader.java:52)
    at games.strategy.engine.framework.map.download.ContentReader.download(ContentReader.java:40)
    at games.strategy.engine.framework.map.listing.MapListingFetcher.download(MapListingFetcher.java:67)
    at games.strategy.engine.framework.map.listing.MapListingFetcher.getMapDownloadListFromGithub(MapListingFetcher.java:50)
    at games.strategy.engine.framework.map.listing.MapListingFetcher.getMapDownloadList(MapListingFetcher.java:27)
    at games.strategy.engine.framework.ui.background.BackgroundTaskRunner$1.doInBackground(BackgroundTaskRunner.java:129)
    at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
frigoref commented 2 months ago

In revision path games/strategy/engine/framework/map/download the file DownloadFileDescription.java contains the enum constant games.strategy.engine.framework.map.download.DownloadFileDescription.MapCategory.Experimental.

Hence, I the error message seems odd.

beelee1 commented 2 months ago

I am also getting this with 2.7+14825

This may have happened in the last few days, as I did a map update 3 days ago and almost always dl from triplea to check that it works and there was np.

I did another update a week ago and I know there was np then.

On linux

Edit Experimental has been replaced in map listings. Sometime in the 2.6 prereleases. The maps/games are listed numerically/alphabetically now. Only one category