@Test public void testOAuth2PersistenceException_1() throws Exception { final Exception cause = new Exception(); final OAuth2PersistenceException result = new OAuth2PersistenceException(cause); Assert.assertNotNull(result); Assert.assertEquals("java.lang.Exception", result.getMessage()); Assert.assertEquals("java.lang.Exception", result.getLocalizedMessage()); Assert .assertEquals( "org.apache.shindig.gadgets.oauth2.persistence.OAuth2PersistenceException: java.lang.Exception", result.toString()); } }
@Inject public JSONOAuth2Persister(final OAuth2Encrypter encrypter, final Authority authority, final String globalRedirectUri, @Nullable @Named("shindig.contextroot") final String contextRoot) throws OAuth2PersistenceException { this.encrypter = encrypter; this.authority = authority; this.globalRedirectUri = globalRedirectUri; this.contextRoot = contextRoot; try { this.configFile = new JSONObject( JSONOAuth2Persister.getJSONString(JSONOAuth2Persister.OAUTH2_CONFIG)); } catch (final Exception e) { if (JSONOAuth2Persister.LOG.isLoggable()) { JSONOAuth2Persister.LOG.log("OAuth2PersistenceException", e); } throw new OAuth2PersistenceException(e); } }
JSONOAuth2Persister.LOG.log("OAuth2PersistenceException", e); throw new OAuth2PersistenceException(e);
@Test public void testOAuth2PersistenceException_1() throws Exception { final Exception cause = new Exception(); final OAuth2PersistenceException result = new OAuth2PersistenceException(cause); Assert.assertNotNull(result); Assert.assertEquals("java.lang.Exception", result.getMessage()); Assert.assertEquals("java.lang.Exception", result.getLocalizedMessage()); Assert .assertEquals( "org.apache.shindig.gadgets.oauth2.persistence.OAuth2PersistenceException: java.lang.Exception", result.toString()); } }
JSONOAuth2Persister.LOG.log("OAuth2PersistenceException", e); throw new OAuth2PersistenceException(e);
client.setEncryptedSecret(secret.getBytes("UTF-8")); } catch (final OAuth2EncryptionException e) { throw new OAuth2PersistenceException(e); JSONOAuth2Persister.LOG.log("OAuth2PersistenceException", e); throw new OAuth2PersistenceException(e);