@@ -55,7 +55,7 @@ public class BugsnagAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
5555 private Set <String > ignoredClasses = new HashSet <String >();
5656
5757 /** Release stages that should be notified. */
58- private Set <String > notifyReleaseStages = new HashSet <String >();
58+ private Set <String > enabledReleaseStages = new HashSet <String >();
5959
6060 /** Project packages. */
6161 private Set <String > projectPackages = new HashSet <String >();
@@ -254,20 +254,20 @@ private Bugsnag createBugsnag() {
254254 bugsnag .setTimeout (timeout );
255255 }
256256
257- if (redactedKeys .size () > 0 ) {
257+ if (! redactedKeys .isEmpty () ) {
258258 bugsnag .setRedactedKeys (redactedKeys .toArray (new String [0 ]));
259259 }
260260
261261 bugsnag .setIgnoreClasses (ignoredClasses .toArray (new String [0 ]));
262262
263- if (notifyReleaseStages . size () > 0 ) {
264- bugsnag .setNotifyReleaseStages ( notifyReleaseStages .toArray (new String [0 ]));
263+ if (! enabledReleaseStages . isEmpty () ) {
264+ bugsnag .setEnabledReleaseStages ( enabledReleaseStages .toArray (new String [0 ]));
265265 }
266266
267267 bugsnag .setProjectPackages (projectPackages .toArray (new String [0 ]));
268268 bugsnag .setSendThreads (sendThreads );
269269
270- // Add a callback to put global meta data on every report
270+ // Add a callback to put global metadata on every report
271271 bugsnag .addCallback (new Callback () {
272272 @ Override
273273 public void beforeNotify (Report report ) {
@@ -417,25 +417,30 @@ public void setIgnoredClasses(String ignoredClasses) {
417417 }
418418 }
419419
420+ @ Deprecated
421+ public void setNotifyReleaseStage (String notifyReleaseStage ) {
422+ setEnabledReleaseStage (notifyReleaseStage );
423+ }
424+
420425 /**
421- * @see Bugsnag#setNotifyReleaseStages (String...)
426+ * @see Bugsnag#setEnabledReleaseStages (String...)
422427 */
423- public void setNotifyReleaseStage (String notifyReleaseStage ) {
424- this .notifyReleaseStages .add (notifyReleaseStage );
428+ public void setEnabledReleaseStage (String enabledReleaseStage ) {
429+ this .enabledReleaseStages .add (enabledReleaseStage );
425430
426431 if (bugsnag != null ) {
427- bugsnag .setNotifyReleaseStages (this .notifyReleaseStages .toArray (new String [0 ]));
432+ bugsnag .setEnabledReleaseStages (this .enabledReleaseStages .toArray (new String [0 ]));
428433 }
429434 }
430435
431436 /**
432- * @see Bugsnag#setNotifyReleaseStages (String...)
437+ * @see Bugsnag#setEnabledReleaseStages (String...)
433438 */
434- public void setNotifyReleaseStages (String notifyReleaseStages ) {
435- this .notifyReleaseStages .addAll (split (notifyReleaseStages ));
439+ public void setEnabledReleaseStages (String enabledReleaseStages ) {
440+ this .enabledReleaseStages .addAll (split (enabledReleaseStages ));
436441
437442 if (bugsnag != null ) {
438- bugsnag .setNotifyReleaseStages (this .notifyReleaseStages .toArray (new String [0 ]));
443+ bugsnag .setEnabledReleaseStages (this .enabledReleaseStages .toArray (new String [0 ]));
439444 }
440445 }
441446
0 commit comments