From 3c4fa71a3c4d596c99a0f5ab9f96ea3dca1b2f44 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 9 Nov 2011 01:17:01 +0000 Subject: [PATCH] - throw exception when trying to set AssetEventListener on ProjectAssetManager -> use addEventListener git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8612 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/core/assets/ProjectAssetManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java index c2fd3dd1b..b5237de78 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java @@ -147,8 +147,13 @@ public class ProjectAssetManager extends DesktopAssetManager { } } + @Override + public void setAssetEventListener(AssetEventListener listener) { + throw new UnsupportedOperationException("Setting the asset event listener is not allowed for ProjectAssetManager, use addAssetEventListener instead"); + } + private void prepAssetEventListeners() { - setAssetEventListener(new AssetEventListener() { + super.setAssetEventListener(new AssetEventListener() { public void assetLoaded(AssetKey ak) { for (AssetEventListener assetEventListener : assetEventListeners) {