public Object put(Object key, Object value) { // if its us then we probably know what we're doing :P if (!(plugin.getClass().getName().startsWith("org.gudy") || plugin.getClass().getName().startsWith("com.aelitis."))) { if ((!initialising) && key instanceof String) { String k_str = (String) key; if (k_str.equalsIgnoreCase("plugin.id") || k_str.equalsIgnoreCase("plugin.version")) { if (org.gudy.azureus2.core3.logging.Logger.isEnabled()) org.gudy.azureus2.core3.logging.Logger.log( new LogEvent( LOGID, LogEvent.LT_WARNING, "Plugin '" + getPluginName() + "' tried to set property '" + k_str + "' - action ignored")); return (null); } } } return (super.put(key, value)); }
public Object setProperty(String str, String val) { // if its us then we probably know what we're doing :P if (!(plugin.getClass().getName().startsWith("org.gudy") || plugin.getClass().getName().startsWith("com.aelitis."))) { if (str.equalsIgnoreCase("plugin.id") || str.equalsIgnoreCase("plugin.version")) { if (org.gudy.azureus2.core3.logging.Logger.isEnabled()) org.gudy.azureus2.core3.logging.Logger.log( new LogEvent( LOGID, LogEvent.LT_WARNING, "Plugin '" + getPluginName() + "' tried to set property '" + str + "' - action ignored")); return (null); } } return (super.setProperty(str, val)); }