Skip to content

Commit 8989a75

Browse files
committed
solve issue #1543 (crash in TestManyLocators) (#1546)
1 parent b8e5c25 commit 8989a75

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

jme3-examples/src/main/java/jme3test/asset/TestManyLocators.java

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2012 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -43,28 +43,29 @@ public class TestManyLocators {
4343
public static void main(String[] args){
4444
AssetManager am = JmeSystem.newAssetManager();
4545

46-
am.registerLocator("http://wiki.jmonkeyengine.org/jme3/beginner",
47-
UrlLocator.class);
46+
am.registerLocator(
47+
"https://github.com/jMonkeyEngine/wiki/raw/master/docs/modules/tutorials/assets/images/beginner/",
48+
UrlLocator.class);
4849

4950
am.registerLocator("town.zip", ZipLocator.class);
5051
am.registerLocator(
51-
"https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/wildhouse.zip",
52-
HttpZipLocator.class);
53-
52+
"https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/wildhouse.zip",
53+
HttpZipLocator.class);
54+
5455
am.registerLocator("/", ClasspathLocator.class);
5556

5657

5758

58-
// Try loading from Core-Data source package
59+
// Try loading from jme3-core resources using the ClasspathLocator.
5960
AssetInfo a = am.locateAsset(new AssetKey<Object>("Interface/Fonts/Default.fnt"));
6061

61-
// Try loading from town scene zip file
62+
// Try loading from the "town.zip" file using the ZipLocator.
6263
AssetInfo b = am.locateAsset(new ModelKey("casaamarela.jpg"));
6364

64-
// Try loading from wildhouse online scene zip file
65+
// Try loading from the Google Code Archive website using the HttpZipLocator.
6566
AssetInfo c = am.locateAsset(new ModelKey("glasstile2.png"));
6667

67-
// Try loading directly from HTTP
68+
// Try loading from the GitHub website using the UrlLocator.
6869
AssetInfo d = am.locateAsset(new TextureKey("beginner-physics.png"));
6970

7071
if (a == null)

0 commit comments

Comments
 (0)