target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test (timeout=180000) public void testAddColumn() throws Exception { final HColumnDescriptor hcd = new HColumnDescriptor("fam_new"); AccessTestAction action = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER.preAddColumn(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TA... | @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor column) throws IOException { requireTablePermission("addColumn", tableName, column.getName(), null, Action.ADMIN, Action.CREATE); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor column) throws I... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor column) throws I... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor column) throws I... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor column) throws I... |
@Test (timeout=180000) public void testModifyColumn() throws Exception { final HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY); hcd.setMaxVersions(10); AccessTestAction action = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER.preModifyColumn(ObserverContext.createA... | @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor descriptor) throws IOException { requirePermission("modifyColumn", tableName, descriptor.getName(), null, Action.ADMIN, Action.CREATE); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor descriptor) t... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor descriptor) t... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor descriptor) t... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor descriptor) t... |
@Test (timeout=60000) @SuppressWarnings("deprecation") public void testDynamicLogLevel() throws Exception { String logName = TestLogLevel.class.getName(); Log testlog = LogFactory.getLog(logName); if (testlog instanceof Log4JLogger) { Logger log = ((Log4JLogger)testlog).getLogger(); log.debug("log.debug1"); log.info("l... | public static void main(String[] args) { if (args.length == 3 && "-getlevel".equals(args[0])) { process("http: return; } else if (args.length == 4 && "-setlevel".equals(args[0])) { process("http: + "&level=" + args[3]); return; } System.err.println(USAGES); System.exit(-1); } | LogLevel { public static void main(String[] args) { if (args.length == 3 && "-getlevel".equals(args[0])) { process("http: return; } else if (args.length == 4 && "-setlevel".equals(args[0])) { process("http: + "&level=" + args[3]); return; } System.err.println(USAGES); System.exit(-1); } } | LogLevel { public static void main(String[] args) { if (args.length == 3 && "-getlevel".equals(args[0])) { process("http: return; } else if (args.length == 4 && "-setlevel".equals(args[0])) { process("http: + "&level=" + args[3]); return; } System.err.println(USAGES); System.exit(-1); } } | LogLevel { public static void main(String[] args) { if (args.length == 3 && "-getlevel".equals(args[0])) { process("http: return; } else if (args.length == 4 && "-setlevel".equals(args[0])) { process("http: + "&level=" + args[3]); return; } System.err.println(USAGES); System.exit(-1); } static void main(String[] args)... | LogLevel { public static void main(String[] args) { if (args.length == 3 && "-getlevel".equals(args[0])) { process("http: return; } else if (args.length == 4 && "-setlevel".equals(args[0])) { process("http: + "&level=" + args[3]); return; } System.err.println(USAGES); System.exit(-1); } static void main(String[] args)... |
@Test (timeout=180000) public void testDeleteColumn() throws Exception { AccessTestAction action = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER.preDeleteColumn(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE, TEST_FAMILY); return null; } }; verifyAllowed(action,... | @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws IOException { requirePermission("deleteColumn", tableName, col, null, Action.ADMIN, Action.CREATE); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws IOException ... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws IOException ... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws IOException ... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws IOException ... |
@Test (timeout=180000) public void testTableDisable() throws Exception { AccessTestAction disableTable = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER.preDisableTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; AccessTestAction disableAclT... | @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { if (Bytes.equals(tableName.getName(), AccessControlLists.ACL_GLOBAL_NAME)) { throw new AccessDeniedException("Not allowed to disable " + AccessControlLists.ACL_TABLE_NAME + " table with Acces... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { if (Bytes.... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { if (Bytes.... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { if (Bytes.... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { if (Bytes.... |
@Test (timeout=180000) public void testTableEnable() throws Exception { AccessTestAction enableTable = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER .preEnableTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; verifyAllowed(enableTable, SUP... | @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePermission("enableTable", tableName, null, null, Action.ADMIN, Action.CREATE); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... |
@Test public void testAbortProcedure() throws Exception { final TableName tableName = TableName.valueOf("testAbortProcedure"); final ProcedureExecutor<MasterProcedureEnv> procExec = TEST_UTIL.getHBaseCluster().getMaster().getMasterProcedureExecutor(); Procedure proc = new TestTableDDLProcedure(procExec.getEnvironment()... | @Override public void preAbortProcedure( ObserverContext<MasterCoprocessorEnvironment> ctx, final ProcedureExecutor<MasterProcedureEnv> procEnv, final long procId) throws IOException { if (!procEnv.isProcedureOwner(procId, getActiveUser())) { requirePermission("abortProcedure", Action.ADMIN); } } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAbortProcedure( ObserverContext<MasterCoprocessorEnvironment> ctx, final ProcedureExecutor<MasterProcedureEnv> pro... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAbortProcedure( ObserverContext<MasterCoprocessorEnvironment> ctx, final ProcedureExecutor<MasterProcedureEnv> pro... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAbortProcedure( ObserverContext<MasterCoprocessorEnvironment> ctx, final ProcedureExecutor<MasterProcedureEnv> pro... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAbortProcedure( ObserverContext<MasterCoprocessorEnvironment> ctx, final ProcedureExecutor<MasterProcedureEnv> pro... |
@Test public void testListProcedures() throws Exception { final TableName tableName = TableName.valueOf("testAbortProcedure"); final ProcedureExecutor<MasterProcedureEnv> procExec = TEST_UTIL.getHBaseCluster().getMaster().getMasterProcedureExecutor(); Procedure proc = new TestTableDDLProcedure(procExec.getEnvironment()... | @Override public void postListProcedures( ObserverContext<MasterCoprocessorEnvironment> ctx, List<ProcedureInfo> procInfoList) throws IOException { if (procInfoList.isEmpty()) { return; } Iterator<ProcedureInfo> itr = procInfoList.iterator(); User user = getActiveUser(); while (itr.hasNext()) { ProcedureInfo procInfo =... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void postListProcedures( ObserverContext<MasterCoprocessorEnvironment> ctx, List<ProcedureInfo> procInfoList) throws IOExc... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void postListProcedures( ObserverContext<MasterCoprocessorEnvironment> ctx, List<ProcedureInfo> procInfoList) throws IOExc... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void postListProcedures( ObserverContext<MasterCoprocessorEnvironment> ctx, List<ProcedureInfo> procInfoList) throws IOExc... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void postListProcedures( ObserverContext<MasterCoprocessorEnvironment> ctx, List<ProcedureInfo> procInfoList) throws IOExc... |
@Test (timeout=180000) public void testMove() throws Exception { List<HRegionLocation> regions; try (RegionLocator locator = systemUserConnection.getRegionLocator(TEST_TABLE)) { regions = locator.getAllRegionLocations(); } HRegionLocation location = regions.get(0); final HRegionInfo hri = location.getRegionInfo(); fina... | @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException { requirePermission("move", region.getTable(), null, null, Action.ADMIN); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destSer... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destSer... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destSer... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destSer... |
@Test (timeout=180000) public void testAssign() throws Exception { List<HRegionLocation> regions; try (RegionLocator locator = systemUserConnection.getRegionLocator(TEST_TABLE)) { regions = locator.getAllRegionLocations(); } HRegionLocation location = regions.get(0); final HRegionInfo hri = location.getRegionInfo(); Ac... | @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("assign", regionInfo.getTable(), null, null, Action.ADMIN); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermis... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermis... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermis... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermis... |
@Test (timeout=180000) public void testUnassign() throws Exception { List<HRegionLocation> regions; try (RegionLocator locator = systemUserConnection.getRegionLocator(TEST_TABLE)) { regions = locator.getAllRegionLocations(); } HRegionLocation location = regions.get(0); final HRegionInfo hri = location.getRegionInfo(); ... | @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOException { requirePermission("unassign", regionInfo.getTable(), null, null, Action.ADMIN); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOExceptio... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOExceptio... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOExceptio... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOExceptio... |
@Test (timeout=180000) public void testRegionOffline() throws Exception { List<HRegionLocation> regions; try (RegionLocator locator = systemUserConnection.getRegionLocator(TEST_TABLE)) { regions = locator.getAllRegionLocations(); } HRegionLocation location = regions.get(0); final HRegionInfo hri = location.getRegionInf... | @Override public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("regionOffline", regionInfo.getTable(), null, null, Action.ADMIN); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requir... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requir... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requir... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requir... |
@Test (timeout=180000) public void testBalance() throws Exception { AccessTestAction action = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER.preBalance(ObserverContext.createAndPrepare(CP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN, USER_GROUP_... | @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Action.ADMIN); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Action.... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Action.... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Action.... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Action.... |
@Test public void testGetActiveHttpProxy() throws IOException, XmlPullParserException { SettingsXpp3Reader r = new SettingsXpp3Reader(); Settings s = r.read(WsImportMojoTest.class.getResourceAsStream("proxy1.xml")); String proxyString = WsImportMojo.getActiveHttpProxy(s); Assert.assertEquals(proxyString, "proxyActive:8... | static String getActiveHttpProxy(Settings s) { String retVal = null; for (Proxy p : s.getProxies()) { if (p.isActive() && "http".equals(p.getProtocol())) { StringBuilder sb = new StringBuilder(); String user = p.getUsername(); String pwd = p.getPassword(); if (user != null) { sb.append(user); if (pwd != null) { sb.appe... | WsImportMojo extends AbstractJaxwsMojo { static String getActiveHttpProxy(Settings s) { String retVal = null; for (Proxy p : s.getProxies()) { if (p.isActive() && "http".equals(p.getProtocol())) { StringBuilder sb = new StringBuilder(); String user = p.getUsername(); String pwd = p.getPassword(); if (user != null) { sb... | WsImportMojo extends AbstractJaxwsMojo { static String getActiveHttpProxy(Settings s) { String retVal = null; for (Proxy p : s.getProxies()) { if (p.isActive() && "http".equals(p.getProtocol())) { StringBuilder sb = new StringBuilder(); String user = p.getUsername(); String pwd = p.getPassword(); if (user != null) { sb... | WsImportMojo extends AbstractJaxwsMojo { static String getActiveHttpProxy(Settings s) { String retVal = null; for (Proxy p : s.getProxies()) { if (p.isActive() && "http".equals(p.getProtocol())) { StringBuilder sb = new StringBuilder(); String user = p.getUsername(); String pwd = p.getPassword(); if (user != null) { sb... | WsImportMojo extends AbstractJaxwsMojo { static String getActiveHttpProxy(Settings s) { String retVal = null; for (Proxy p : s.getProxies()) { if (p.isActive() && "http".equals(p.getProtocol())) { StringBuilder sb = new StringBuilder(); String user = p.getUsername(); String pwd = p.getPassword(); if (user != null) { sb... |
@Test public void testDisablePropagation() throws IOException { { HttpClient client = ((TracingHttpClientBuilder)clientBuilder).disableInjection().build(); client.execute(new HttpGet(serverUrl(RedirectHandler.MAPPING))); } List<MockSpan> mockSpans = mockTracer.finishedSpans(); Assert.assertEquals(3, mockSpans.size()); ... | public TracingHttpClientBuilder disableInjection() { this.injectDisabled = true; return this; } | TracingHttpClientBuilder extends HttpClientBuilder { public TracingHttpClientBuilder disableInjection() { this.injectDisabled = true; return this; } } | TracingHttpClientBuilder extends HttpClientBuilder { public TracingHttpClientBuilder disableInjection() { this.injectDisabled = true; return this; } TracingHttpClientBuilder(); TracingHttpClientBuilder(
RedirectStrategy redirectStrategy,
boolean redirectHandlingDisabled); TracingHttpClientBuilder(
... | TracingHttpClientBuilder extends HttpClientBuilder { public TracingHttpClientBuilder disableInjection() { this.injectDisabled = true; return this; } TracingHttpClientBuilder(); TracingHttpClientBuilder(
RedirectStrategy redirectStrategy,
boolean redirectHandlingDisabled); TracingHttpClientBuilder(
... | TracingHttpClientBuilder extends HttpClientBuilder { public TracingHttpClientBuilder disableInjection() { this.injectDisabled = true; return this; } TracingHttpClientBuilder(); TracingHttpClientBuilder(
RedirectStrategy redirectStrategy,
boolean redirectHandlingDisabled); TracingHttpClientBuilder(
... |
@Test public void testAesEncrypt() { try { WXBizMsgCrypt pc = new WXBizMsgCrypt(token, encodingAesKey, appId); assertEquals(afterAesEncrypt, pc.encrypt(randomStr, replyMsg)); } catch (AesException e) { e.printStackTrace(); fail("no异常"); } } | public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = appId.getBytes(CHAR... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... |
@Test public void testAesEncrypt2() { try { WXBizMsgCrypt pc = new WXBizMsgCrypt(token, encodingAesKey, appId); assertEquals(afterAesEncrypt2, pc.encrypt(randomStr, replyMsg2)); } catch (AesException e) { e.printStackTrace(); fail("no异常"); } } | public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = appId.getBytes(CHAR... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... | WXBizMsgCrypt { public String encrypt(String randomStr, String text) throws AesException { ByteGroup byteCollector = new ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = app... |
@Test public void testVerifyUrl() throws AesException { WXBizMsgCrypt wxcpt = new WXBizMsgCrypt("QDG6eK", "jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C", "wx5823bf96d3bd56c7"); String verifyMsgSig = "5c45ff5e21c57e6ad56bac8758b79b1d9ac89fd3"; String timeStamp = "1409659589"; String nonce = "263014780"; String echoStr = ... | public String verifyUrl(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new AesException(AesException.ValidateSignatureError); } String result = decrypt(echoStr); re... | WXBizMsgCrypt { public String verifyUrl(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new AesException(AesException.ValidateSignatureError); } String result = decr... | WXBizMsgCrypt { public String verifyUrl(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new AesException(AesException.ValidateSignatureError); } String result = decr... | WXBizMsgCrypt { public String verifyUrl(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new AesException(AesException.ValidateSignatureError); } String result = decr... | WXBizMsgCrypt { public String verifyUrl(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new AesException(AesException.ValidateSignatureError); } String result = decr... |
@Test public void incompatibilityTest() throws Exception { setFinalStatic(Build.VERSION.class.getField("SDK_INT"), Build.VERSION_CODES.LOLLIPOP); mPresenter.checkAndroidVersionCompatibility(); verify(mView).showIncompatibleAndroidVersionDialog(); } | @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } } | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } MainActivityPresenter(MainActivityContract.View view,
SettingsManager settingsManager, Co... | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } MainActivityPresenter(MainActivityContract.View view,
SettingsManager settingsManager, Co... | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } MainActivityPresenter(MainActivityContract.View view,
SettingsManager settingsManager, Co... |
@Test public void compatibilityTest() throws Exception { setFinalStatic(Build.VERSION.class.getField("SDK_INT"), Build.VERSION_CODES.N); mPresenter.checkAndroidVersionCompatibility(); verify(mView, never()).showIncompatibleAndroidVersionDialog(); } | @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } } | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } MainActivityPresenter(MainActivityContract.View view,
SettingsManager settingsManager, Co... | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } MainActivityPresenter(MainActivityContract.View view,
SettingsManager settingsManager, Co... | MainActivityPresenter implements MainActivityContract.Presenter { @VisibleForTesting void checkAndroidVersionCompatibility() { if (!supportedByArtist()) { mView.showIncompatibleAndroidVersionDialog(); } } MainActivityPresenter(MainActivityContract.View view,
SettingsManager settingsManager, Co... |
@Test public void selectInfoFragment() throws Exception { mPresenter.selectFragment(MainActivityPresenter.INFO_FRAGMENT); verify(mView).showSelectedFragment(mArgumentCaptor.capture()); assertTrue(mArgumentCaptor.getValue() instanceof InfoFragment); } | @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRUMENTATION_FRAGMENT: if (mAppListFragment == null) { mAppListFragme... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... |
@Test public void selectAppListFragment() throws Exception { mPresenter.selectFragment(MainActivityPresenter.INSTRUMENTATION_FRAGMENT); verify(mView).showSelectedFragment(mArgumentCaptor.capture()); assertTrue(mArgumentCaptor.getValue() instanceof AppListFragment); } | @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRUMENTATION_FRAGMENT: if (mAppListFragment == null) { mAppListFragme... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... | MainActivityPresenter implements MainActivityContract.Presenter { @Override public void selectFragment(@selectableFragment int id) { Fragment selectedFragment = null; switch (id) { case INFO_FRAGMENT: if (mInfoFragment == null) { mInfoFragment = new InfoFragment(); } selectedFragment = mInfoFragment; break; case INSTRU... |
@Test public void testIsConnected() { TestServer server = null; try { final POP3Handler handler = new POP3HandlerNoopErr(); server = new TestServer(handler); server.start(); final Properties properties = new Properties(); properties.setProperty("mail.pop3.host", "localhost"); properties.setProperty("mail.pop3.port", ""... | @Override public synchronized boolean isConnected() { if (!super.isConnected()) return false; try { if (port == null) port = getPort(null); else if (!port.noop()) throw new IOException("NOOP failed"); return true; } catch (IOException ioex) { try { super.close(); } catch (MessagingException mex) { } return false; } } | POP3Store extends Store { @Override public synchronized boolean isConnected() { if (!super.isConnected()) return false; try { if (port == null) port = getPort(null); else if (!port.noop()) throw new IOException("NOOP failed"); return true; } catch (IOException ioex) { try { super.close(); } catch (MessagingException me... | POP3Store extends Store { @Override public synchronized boolean isConnected() { if (!super.isConnected()) return false; try { if (port == null) port = getPort(null); else if (!port.noop()) throw new IOException("NOOP failed"); return true; } catch (IOException ioex) { try { super.close(); } catch (MessagingException me... | POP3Store extends Store { @Override public synchronized boolean isConnected() { if (!super.isConnected()) return false; try { if (port == null) port = getPort(null); else if (!port.noop()) throw new IOException("NOOP failed"); return true; } catch (IOException ioex) { try { super.close(); } catch (MessagingException me... | POP3Store extends Store { @Override public synchronized boolean isConnected() { if (!super.isConnected()) return false; try { if (port == null) port = getPort(null); else if (!port.noop()) throw new IOException("NOOP failed"); return true; } catch (IOException ioex) { try { super.close(); } catch (MessagingException me... |
@Test public void testByNullAndFrameworkInterrupted() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(this.headWidChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndInterrupted() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(headIeChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2); r1.setTh... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndInterruptedSub() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(headSubIeChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2); r1... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndInterruptedIo() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(headIioeChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2); r1.s... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndInterruptedIoSub() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(headSubIioeChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2)... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndThreadDeath() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(headTdChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2); r1.setTh... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndThreadDeathSub() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertEquals(r1.getLevel(), r2.getLevel()); r1.setThrown(headSubTdChain(null)); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2); r1... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndThrown() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); r1.setSequenceNumber(r2.getSequenceNumber()); setEpochMilli(r2, System.currentTimeMillis()); setEpochMilli(r1, r2.getMillis()); assertEquals(r1.getL... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByNullAndNullSeq() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertTrue(r1.getSequenceNumber() < r2.getSequenceNumber()); assertNull(r1.getThrown()); assertNull(r2.getThrown()); assertRecordLessThan(r1, r2); ... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByThrownAndThrownSeq() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); assertTrue(r1.getSequenceNumber() < r2.getSequenceNumber()); assertTrue(r1.getSequenceNumber() < r2.getSequenceNumber()); r1.setThrown(new Erro... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test @SuppressWarnings("deprecation") public void testSessionIntDef() throws Exception { Properties props = new Properties(); Session sess = Session.getInstance(props, null); assertEquals(PropUtil.getIntSessionProperty(sess, "test", 1), 1); } | @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props,
String nam... | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props,
String nam... |
@Test public void testByThrownAndInterrupted() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); swapSeq(r1, r2); assertTrue(r1.getSequenceNumber() > r2.getSequenceNumber()); r1.setThrown(headIeChain(null)); r2.setThrown(new Error()); ass... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByThrownAndInterruptedSub() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); swapSeq(r1, r2); assertTrue(r1.getSequenceNumber() > r2.getSequenceNumber()); r1.setThrown(headSubIeChain(null)); r2.setThrown(new Error()... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByThrownAndInterruptedIoSub() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); swapSeq(r1, r2); assertTrue(r1.getSequenceNumber() > r2.getSequenceNumber()); r1.setThrown(headSubIioeChain(null)); r2.setThrown(new Err... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByThrownAndThreadDeath() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); swapSeq(r1, r2); assertTrue(r1.getSequenceNumber() > r2.getSequenceNumber()); r1.setThrown(headTdChain(null)); r2.setThrown(new Error()); ass... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testByThrownAndThreadDeathSub() { LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); swapSeq(r1, r2); assertTrue(r1.getSequenceNumber() > r2.getSequenceNumber()); r1.setThrown(headSubTdChain(null)); r2.setThrown(new Error()... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testOfClassLoadReadFailed() { Throwable clrf = new NoClassDefFoundError().initCause( new ClassNotFoundException("", new IOException())); Throwable readFailed = new IOException(); LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toStri... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testOfClassLoadInterrupted() { Throwable cli = new NoClassDefFoundError().initCause( new ClassNotFoundException("", headIioeChain(null))); Throwable iioe = headIioeChain(null); LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testOfNpeVsIoe() { Throwable readFailed = new IOException(); Throwable npe = new IOException().initCause(new NullPointerException()); LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString()); LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString()); r1.setThrown(readFailed); r2.setThrown... | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test @SuppressWarnings("ObjectEqualsNull") public void testEquals() { final SeverityComparator a = new SeverityComparator(); final SeverityComparator b = new SeverityComparator(); assertNotSame(a, b); assertNotNull(a); assertFalse(a.equals(null)); assertNotNull(b); assertFalse(b.equals(null)); assertTrue(a.equals(a));... | @Override public boolean equals(final Object o) { return o == null ? false : o.getClass() == getClass(); } | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public boolean equals(final Object o) { return o == null ? false : o.getClass() == getClass(); } } | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public boolean equals(final Object o) { return o == null ? false : o.getClass() == getClass(); } } | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public boolean equals(final Object o) { return o == null ? false : o.getClass() == getClass(); } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final... | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public boolean equals(final Object o) { return o == null ? false : o.getClass() == getClass(); } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final... |
@Test public void testHashCode() { final SeverityComparator a = new SeverityComparator(); final SeverityComparator b = new SeverityComparator(); assertNotSame(a, b); assertTrue(a.equals(b)); assertTrue(b.equals(a)); assertEquals(a.hashCode(), b.hashCode()); } | @Override public int hashCode() { return 31 * getClass().hashCode(); } | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public int hashCode() { return 31 * getClass().hashCode(); } } | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public int hashCode() { return 31 * getClass().hashCode(); } } | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public int hashCode() { return 31 * getClass().hashCode(); } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2); @SuppressWarnings("o... | SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public int hashCode() { return 31 * getClass().hashCode(); } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2); @SuppressWarnings("o... |
@Test @SuppressWarnings("deprecation") public void testSessionIntDefProp() throws Exception { Properties defprops = new Properties(); defprops.setProperty("test", "2"); Properties props = new Properties(defprops); Session sess = Session.getInstance(props, null); assertEquals(PropUtil.getIntSessionProperty(sess, "test",... | @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props,
String nam... | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props,
String nam... |
@Test public void testToString() { final SeverityComparator a = new SeverityComparator(); assertNotNull(a.toString()); assertEquals(a.toString(), a.toString()); } | private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } } | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... | SeverityComparator implements Comparator<LogRecord>, Serializable { private static String toString(final Object o1, final Object o2) { return o1 + ", " + o2; } Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2);... |
@Test public void testFormat() throws Exception { final String p = CompactFormatter.class.getName(); Properties props = new Properties(); props.put(p.concat(".format"), "%9$s"); LogManager manager = LogManager.getLogManager(); try { read(manager, props); CompactFormatter cf = new CompactFormatter(); LogRecord first = n... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testNewFormatterWithPattern() { CompactFormatter cf = new CompactFormatter("%4$s"); String result = cf.format(new LogRecord(Level.SEVERE, "")); assertEquals(Level.SEVERE.getLocalizedName(), result); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatWithMessage() { LogRecord record = new LogRecord(Level.SEVERE, "message"); CompactFormatter cf = new CompactFormatter(); String result = cf.format(record); assertTrue(result, result.startsWith(record.getMessage())); assertTrue(result, result.endsWith(LINE_SEP)); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatWithMessagePrecisionOverWidth() { LogRecord record = new LogRecord(Level.SEVERE, "message"); record.setThrown(new Throwable("thrown")); CompactFormatter cf = new CompactFormatter("%7$#6.12s"); String result = cf.format(record); assertEquals("mes|Throwable", result); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatWithMessageWidthOverPrecision() { LogRecord record = new LogRecord(Level.SEVERE, "message"); record.setThrown(new Throwable("thrown")); CompactFormatter cf = new CompactFormatter("%7$#12.6s"); String result = cf.format(record); assertEquals("mes\u0020\u0020\u0020|Thr\u0020\u0020\u0020", resu... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatWithMessageEmpty() { LogRecord record = new LogRecord(Level.SEVERE, ""); CompactFormatter cf = new CompactFormatter(); String result = cf.format(record); assertEquals(result, LINE_SEP); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatMessageSurrogate() { LogRecord record = new LogRecord(Level.SEVERE, "a\ud801\udc00\ud801\udc00\ud801\udc00\ud801\udc00"); record.setThrown(new Throwable("thrown")); CompactFormatter cf = new CompactFormatter("%7$#.6s%n"); String result = cf.format(record); assertTrue(result, result.startsWit... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatWithMessageAndThrownLeftToRight() { LogRecord record = new LogRecord(Level.SEVERE, "message"); record.setThrown(new Throwable("thrown")); CompactFormatter cf = new CompactFormatter(); String result = cf.format(record); assertTrue(result, result.startsWith(record.getMessage())); assertTrue(re... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test(expected = NullPointerException.class) public void testFormatMessageNull() { CompactFormatter cf = new CompactFormatter(); cf.formatMessage((LogRecord) null); fail(cf.toString()); } | @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... |
@Test @SuppressWarnings("deprecation") public void testSessionInteger() throws Exception { Properties props = new Properties(); props.put("test", 2); Session sess = Session.getInstance(props, null); assertEquals(PropUtil.getIntSessionProperty(sess, "test", 1), 2); } | @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props,
String nam... | PropUtil { @Deprecated public static int getIntSessionProperty(Session session, String name, int def) { return getInt(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props,
String nam... |
@Test(timeout = 30000) public void testFormatMessage_LogRecordEvil() { LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThrown(createEvilThrowable()); CompactFormatter cf = new CompactFormatter(); cf.formatMessage(record); } | @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... |
@Test public void testFormatMaxThrowableWidthLeftToRight() { String fmt = LEFT_TO_RIGHT; int width = MAX_PRE; assertTrue(fmt, fmt.contains(Integer.toString(width))); assertTrue(String.valueOf(width), width < Integer.MAX_VALUE / 4); CompactFormatter cf = new CompactFormatter(fmt); LogRecord record = new LogRecord(Level.... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatThrownClassDotSpace() { String msg = "test"; String prefix = IllegalStateException.class.getName() + ". "; Throwable t = new PrefixException(prefix, null, null); assertEquals(prefix, t.toString()); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThrown(t); CompactFormatter cf =... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatThrownSimpleClassNameNullMessage() { String op = "some op"; Throwable t = new PrefixException(PrefixException.class.getSimpleName() + ": " + op, (String) null, null); assertNull(t.getMessage()); assertNotNull(t.toString()); assertTrue(t.toString().startsWith(t.getClass().getSimpleName())); L... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatServerSidetMetroException() { String msg = "server error"; NullPointerException npe = new NullPointerException(msg); Throwable t = new PrefixException(npe.getClass().getName(), msg, null); assertEquals(msg, npe.getMessage()); assertEquals(msg, t.getMessage()); assertEquals(npe.toString(), t.... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatThrownPrefixMessageRetainsFqn() { String msg = "java.io.tmpdir"; NullPointerException npe = new NullPointerException(msg); Throwable t = new PrefixException(npe.getClass().getName(), msg, null); assertEquals(msg, npe.getMessage()); assertEquals(msg, t.getMessage()); assertEquals(npe.toString... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatThrownHiddenMessageRetainsFqn() { String msg = "java.io.tmpdir"; NullPointerException npe = new NullPointerException(msg); Throwable t = new ToStringException(npe.getClass().getName(), msg); assertEquals(msg, npe.getMessage()); assertEquals(msg, t.getMessage()); LogRecord record = new LogRec... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatXMLParseXercesException() { String msg = "XML"; String prefix = "1:two:3:four"; Throwable t = new PrefixException(prefix, msg, null); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThrown(t); CompactFormatter cf = new CompactFormatter("%6$s"); String result = cf.format(record)... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatGSSException() { String msg = "Invalid name provided"; String prefix = PrefixException.class.getSimpleName(); Throwable t = new PrefixException(prefix, msg, null); assertTrue(t.toString().startsWith(t.getClass().getSimpleName())); LogRecord record = new LogRecord(Level.SEVERE, ""); record.se... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatMismatchedTreeNodeException() { String prefix = ToStringException.class.getSimpleName() + '(' + String.class.getName() + "!=" + Throwable.class.getName() + ')'; Throwable t = new ToStringException(prefix, (String) null); assertNull(t.getLocalizedMessage()); assertNull(t.getMessage()); LogRec... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test @SuppressWarnings("deprecation") public void testSessionBool() throws Exception { Properties props = new Properties(); props.setProperty("test", "true"); Session sess = Session.getInstance(props, null); assertTrue(PropUtil.getBooleanSessionProperty(sess, "test", false)); } | @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... |
@Test public void testFormatInnerException() { String msg = "inner class"; String prefix = '(' + String.class.getName() + "!=" + Throwable.class.getName() + ')'; Throwable t = new ToStringException(ToStringException.class.getName() + prefix, msg); assertFalse(t.toString().contains(t.getLocalizedMessage())); LogRecord r... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatMessage_Throwable() { Exception e = new IOException(Exception.class.getName()); e = new Exception(e.toString(), e); assertNotNull(e.getMessage(), e.getMessage()); CompactFormatter cf = new CompactFormatter(); String result = cf.formatMessage(e); assertEquals(IOException.class.getSimpleName()... | @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... |
@Test public void testFormatMessage_ThrowableNull() { CompactFormatter cf = new CompactFormatter(); String result = cf.formatMessage((Throwable) null); assertEquals("", result); } | @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... |
@Test public void testFormatMessage_ThrowableNullMessage() { CompactFormatter cf = new CompactFormatter(); String result = cf.formatMessage(new Throwable()); String expect = Throwable.class.getSimpleName(); assertEquals(expect, result); } | @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... |
@Test(timeout = 30000) public void testFormatMessage_ThrowableEvil() { CompactFormatter cf = new CompactFormatter(); cf.formatMessage(createEvilThrowable()); } | @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } } | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... | CompactFormatter extends java.util.logging.Formatter { @Override public String formatMessage(final LogRecord record) { String msg = super.formatMessage(record); msg = replaceClassName(msg, record.getThrown()); msg = replaceClassName(msg, record.getParameters()); return msg; } CompactFormatter(); CompactFormatter(final... |
@Test public void testFormatLevel() { CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); String result = cf.formatLevel(record); assertEquals(record.getLevel().getLocalizedName(), result); } | public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } } | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); S... | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); S... |
@Test(expected = NullPointerException.class) public void testFormatLevelNull() { CompactFormatter cf = new CompactFormatter(); cf.formatLevel((LogRecord) null); fail(cf.toString()); } | public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } } | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); S... | CompactFormatter extends java.util.logging.Formatter { public String formatLevel(final LogRecord record) { return record.getLevel().getLocalizedName(); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); S... |
@Test public void testFormatLogger() { CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setSourceMethodName(null); record.setSourceClassName(null); record.setLoggerName(Object.class.getName()); String result = cf.formatLoggerName(record); assertEquals(Object.class... | public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } } | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord re... | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord re... |
@Test(expected = NullPointerException.class) public void testFormatLoggerNull() { CompactFormatter cf = new CompactFormatter(); cf.formatLoggerName((LogRecord) null); fail(cf.toString()); } | public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } } | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord re... | CompactFormatter extends java.util.logging.Formatter { public String formatLoggerName(final LogRecord record) { return simpleClassName(record.getLoggerName()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord re... |
@Test public void testFormatMillis() { String p = "%1$tc"; CompactFormatter cf = new CompactFormatter(p); LogRecord r = new LogRecord(Level.SEVERE, ""); assertEquals(String.format(p, r.getMillis()), cf.format(r)); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test @SuppressWarnings("deprecation") public void testSessionBoolDef() throws Exception { Properties props = new Properties(); Session sess = Session.getInstance(props, null); assertTrue(PropUtil.getBooleanSessionProperty(sess, "test", true)); } | @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... |
@Test public void testFormatMillisLocale() throws Exception { String p = "%1$tc"; CompactFormatter cf = new CompactFormatter(p); Properties props = new Properties(); LogRecord r = new LogRecord(Level.SEVERE, ""); r.setResourceBundle(new LocaleResource(props, Locale.ENGLISH)); assertEquals(String.format(Locale.ENGLISH, ... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatMillisByParts() { String p = "%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp"; CompactFormatter cf = new CompactFormatter(p); LogRecord r = new LogRecord(Level.SEVERE, ""); assertEquals(String.format(p, r.getMillis()), cf.format(r)); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatMillisByPartsLocale() throws Exception { String p = "%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp"; CompactFormatter cf = new CompactFormatter(p); Properties props = new Properties(); LogRecord r = new LogRecord(Level.SEVERE, ""); r.setResourceBundle(new LocaleResource(props, Locale.ENGLISH));... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatMillisAsLong() { String p = "%1$tQ"; CompactFormatter cf = new CompactFormatter(p); LogRecord r = new LogRecord(Level.SEVERE, ""); assertEquals(String.format(p, r.getMillis()), cf.format(r)); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatZoneDateTime() throws Exception { LogRecord r = new LogRecord(Level.SEVERE, ""); Object zdt = LogManagerProperties.getZonedDateTime(r); if (zdt != null) { String p = "%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS.%1$tN %1$Tp"; CompactFormatter cf = new CompactFormatter(p); assertEquals(String.format(... | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test(expected = NullPointerException.class) public void testFormatNull() { CompactFormatter cf = new CompactFormatter(); cf.format((LogRecord) null); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatResourceBundleName() { CompactFormatter cf = new CompactFormatter("%15$s"); LogRecord r = new LogRecord(Level.SEVERE, ""); r.setResourceBundleName("name"); String output = cf.format(r); assertEquals(r.getResourceBundleName(), output); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatSequence() { CompactFormatter cf = new CompactFormatter("%9$d"); LogRecord record = new LogRecord(Level.SEVERE, ""); String output = cf.format(record); String expect = Long.toString(record.getSequenceNumber()); assertEquals(expect, output); } | @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Object[] params = { formatZonedDateTime(record), formatSourc... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... | CompactFormatter extends java.util.logging.Formatter { @Override public String format(final LogRecord record) { ResourceBundle rb = record.getResourceBundle(); Locale l = rb == null ? null : rb.getLocale(); String msg = formatMessage(record); String thrown = formatThrown(record); String err = formatError(record); Objec... |
@Test public void testFormatSourceByLogger() { CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setSourceMethodName(null); record.setSourceClassName(null); record.setLoggerName(Object.class.getName()); String result = cf.formatSource(record); assertEquals(Object.c... | public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... |
@Test(expected = NullPointerException.class) public void testFormatSourceNull() { CompactFormatter cf = new CompactFormatter(); cf.formatSource((LogRecord) null); fail(cf.toString()); } | public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... |
@Test @SuppressWarnings("deprecation") public void testSessionBoolDefProp() throws Exception { Properties defprops = new Properties(); defprops.setProperty("test", "true"); Properties props = new Properties(defprops); Session sess = Session.getInstance(props, null); assertTrue(PropUtil.getBooleanSessionProperty(sess, "... | @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... |
@Test public void testFormatSourceByClass() { CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setSourceMethodName(null); record.setSourceClassName(Object.class.getName()); record.setLoggerName(""); String result = cf.formatSource(record); assertEquals(Object.clas... | public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... |
@Test public void testFormatSourceByClassAndMethod() { CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setSourceMethodName("method"); record.setSourceClassName(Object.class.getName()); record.setLoggerName(""); String result = cf.formatSource(record); assertFalse... | public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... | CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassN... |
@Test(timeout = 30000) public void testFormatThrownEvilThrown() { LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThrown(createEvilThrowable()); CompactFormatter cf = new CompactFormatter(); cf.formatThrown(record); } | public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... |
@Test public void testFormatThrown() { Exception e = new IOException("Fake I/O"); e = new Exception(e.toString(), e); assertNotNull(e.getMessage(), e.getMessage()); CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThrown(e); String result = cf.formatThrown(reco... | public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... |
@Test public void testFormatThrownLocalized() { CountLocalizedException cle = new CountLocalizedException(); CompactFormatter cf = new CompactFormatter(); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThrown(cle); String result = cf.formatThrown(record); assertNotNull(result, result); assertTrue(cle.loc... | public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... |
@Test(expected = NullPointerException.class) public void testFormatThrownNullRecord() { CompactFormatter cf = new CompactFormatter(); cf.formatThrown((LogRecord) null); fail(cf.toString()); } | public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } } | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... | CompactFormatter extends java.util.logging.Formatter { public String formatThrown(final LogRecord record) { String msg; final Throwable t = record.getThrown(); if (t != null) { String site = formatBackTrace(record); msg = formatMessage(t) + (isNullOrSpaces(site) ? "" : ' ' + site); } else { msg = ""; } return msg; } Co... |
@Test public void testFormatThreadID() { CompactFormatter cf = new CompactFormatter("%10$d"); LogRecord record = new LogRecord(Level.SEVERE, ""); record.setThreadID(10); String output = cf.format(record); String expect = Long.toString(record.getThreadID()); assertEquals(expect, output); record.setThreadID(-1); output =... | public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } } | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecor... | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecor... |
@Test(expected = NullPointerException.class) public void testFormatThreadIDNull() { CompactFormatter cf = new CompactFormatter(); cf.formatThreadID((LogRecord) null); } | public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } } | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecor... | CompactFormatter extends java.util.logging.Formatter { public Number formatThreadID(final LogRecord record) { return (((long) record.getThreadID()) & 0xffffffffL); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecor... |
@Test public void testFormatError() { CompactFormatter cf = new CompactFormatter("%11$s"); LogRecord record = new LogRecord(Level.SEVERE, "message"); record.setThrown(new Throwable("error")); String output = cf.format(record); assertTrue(output.startsWith(record.getThrown() .getClass().getSimpleName())); assertTrue(out... | public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } } | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); Stri... | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); Stri... |
@Test(expected = NullPointerException.class) public void testFormatErrorNull() { CompactFormatter cf = new CompactFormatter(); cf.formatError((LogRecord) null); } | public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } } | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } CompactFormatter(); CompactFormatter(final String format); } | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); Stri... | CompactFormatter extends java.util.logging.Formatter { public String formatError(final LogRecord record) { return formatMessage(record.getThrown()); } CompactFormatter(); CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); Stri... |
@Test @SuppressWarnings("deprecation") public void testSessionBoolean() throws Exception { Properties props = new Properties(); props.put("test", true); Session sess = Session.getInstance(props, null); assertTrue(PropUtil.getBooleanSessionProperty(sess, "test", false)); } | @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); } | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... | PropUtil { @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); } private PropUtil(); static int getIntProperty(Properties props, String name, int def); static boolean getBooleanProperty(Properties props... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.