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.29k stars 382 forks source link

2.6.14752: DownloadFileParser#lambda$parse$0:45 - java.lang.ClassCastException #12624

Closed tripleabuilderbot closed 1 month ago

tripleabuilderbot commented 1 month ago

Log Message

class java.lang.Double cannot be cast to class java.lang.Integer (java.lang.Double and java.lang.Integer are in module java.base of loader 'bootstrap')

TripleA Version

2.6.14752

Java Version

11.0.19

Operating System

Windows 10

Heap Size

3832M

Stack Trace

Exception: java.lang.ClassCastException class java.lang.Double cannot be cast to class java.lang.Integer (java.lang.Double and java.lang.Integer are in module java.base of loader 'bootstrap')
java.lang.Exception
    at games.strategy.engine.framework.map.download.DownloadFileParser.lambda$parse$0(DownloadFileParser.java:45)
    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)
asvitkine commented 1 month ago

This seems to be that a non-integer version number was specified in a yaml file?

asvitkine commented 1 month ago

Probably this:

- mapName: The Shogun
  mapCategory: EXPERIMENTAL
  url: https://github.com/triplea-maps/the_shogun/archive/master.zip
  version: 1.4
  img: https://raw.githubusercontent.com/triplea-maps/the_shogun/master/preview.png
  description: |
   <br>Japanese warfare in the Sengoku Jidai Warring States period.
asvitkine commented 1 month ago

@TheDog-GH

I don't think "1.4" is supported as a version number there...

asvitkine commented 1 month ago

I undid the change in https://github.com/triplea-game/triplea/pull/12625.

TheDog-GH commented 1 month ago

Thanks!