@Test @DisplayName("doesn't add non GlobalConfigurationObserver instances") void dontAcceptNonGlobalConfigurationObservers() { final GlobalConfigurationObservable observable = new GlobalConfigurationObservable(); observable.addObserver((o, arg) -> { }); assertEquals(0, observable.countObservers()); }
@Override public synchronized void addObserver(Observer o) { if (o instanceof GlobalConfigurationObserver) { super.addObserver(o); } }
GlobalConfigurationObservable extends Observable { @Override public synchronized void addObserver(Observer o) { if (o instanceof GlobalConfigurationObserver) { super.addObserver(o); } } }
GlobalConfigurationObservable extends Observable { @Override public synchronized void addObserver(Observer o) { if (o instanceof GlobalConfigurationObserver) { super.addObserver(o); } }  }
GlobalConfigurationObservable extends Observable { @Override public synchronized void addObserver(Observer o) { if (o instanceof GlobalConfigurationObserver) { super.addObserver(o); } }  @Override synchronized void addObserver(Observer o); void notifyThemeChanged(final String oldTheme, final String newTheme); void notifyProxyHostChanged(final boolean forHttps, final String oldHost, final String newHost); void notifyProxyPortChanged(final boolean forHttps, final Integer oldPort, final Integer newPort); }
GlobalConfigurationObservable extends Observable { @Override public synchronized void addObserver(Observer o) { if (o instanceof GlobalConfigurationObserver) { super.addObserver(o); } }  @Override synchronized void addObserver(Observer o); void notifyThemeChanged(final String oldTheme, final String newTheme); void notifyProxyHostChanged(final boolean forHttps, final String oldHost, final String newHost); void notifyProxyPortChanged(final boolean forHttps, final Integer oldPort, final Integer newPort);  }