@Test public void shouldObfuscateWhenNotConfigured() { when(this.xwikiPropertiesSource.getProperty("mail.general.obfuscate", false)).thenReturn(false); assertFalse(this.configuration.shouldObfuscate()); }
@Override public boolean shouldObfuscate() { Boolean obfuscateEmailAddresses = this.currentWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); if (obfuscateEmailAddresses == null && !isMainWiki()) { obfuscateEmailAddresses = this.mainWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); } if (obfuscateEmailAddresses == null) { obfuscateEmailAddresses = this.xwikiPropertiesSource.getProperty(PREFIX + OBFUSCATE_EMAIL_ADDRESSES, DEFAULT_OBFUSCATE_EMAIL_ADDRESSES); } return obfuscateEmailAddresses; }
DefaultGeneralMailConfiguration implements GeneralMailConfiguration { @Override public boolean shouldObfuscate() { Boolean obfuscateEmailAddresses = this.currentWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); if (obfuscateEmailAddresses == null && !isMainWiki()) { obfuscateEmailAddresses = this.mainWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); } if (obfuscateEmailAddresses == null) { obfuscateEmailAddresses = this.xwikiPropertiesSource.getProperty(PREFIX + OBFUSCATE_EMAIL_ADDRESSES, DEFAULT_OBFUSCATE_EMAIL_ADDRESSES); } return obfuscateEmailAddresses; } }
DefaultGeneralMailConfiguration implements GeneralMailConfiguration { @Override public boolean shouldObfuscate() { Boolean obfuscateEmailAddresses = this.currentWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); if (obfuscateEmailAddresses == null && !isMainWiki()) { obfuscateEmailAddresses = this.mainWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); } if (obfuscateEmailAddresses == null) { obfuscateEmailAddresses = this.xwikiPropertiesSource.getProperty(PREFIX + OBFUSCATE_EMAIL_ADDRESSES, DEFAULT_OBFUSCATE_EMAIL_ADDRESSES); } return obfuscateEmailAddresses; }  }
DefaultGeneralMailConfiguration implements GeneralMailConfiguration { @Override public boolean shouldObfuscate() { Boolean obfuscateEmailAddresses = this.currentWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); if (obfuscateEmailAddresses == null && !isMainWiki()) { obfuscateEmailAddresses = this.mainWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); } if (obfuscateEmailAddresses == null) { obfuscateEmailAddresses = this.xwikiPropertiesSource.getProperty(PREFIX + OBFUSCATE_EMAIL_ADDRESSES, DEFAULT_OBFUSCATE_EMAIL_ADDRESSES); } return obfuscateEmailAddresses; }  @Override boolean shouldObfuscate(); }
DefaultGeneralMailConfiguration implements GeneralMailConfiguration { @Override public boolean shouldObfuscate() { Boolean obfuscateEmailAddresses = this.currentWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); if (obfuscateEmailAddresses == null && !isMainWiki()) { obfuscateEmailAddresses = this.mainWikiMailConfigSource.getProperty(OBFUSCATE_EMAIL_ADDRESSES, Boolean.class); } if (obfuscateEmailAddresses == null) { obfuscateEmailAddresses = this.xwikiPropertiesSource.getProperty(PREFIX + OBFUSCATE_EMAIL_ADDRESSES, DEFAULT_OBFUSCATE_EMAIL_ADDRESSES); } return obfuscateEmailAddresses; }  @Override boolean shouldObfuscate();  }