List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:de.zib.gndms.GORFX.context.service.globus.resource.TaskResource.java
public TaskExecutionFailure getTaskExecutionFailure() { TaskExecutionFailure fail = new TaskExecutionFailure(); if (taskAction.getModel().getState().equals(TaskState.FAILED)) { if (taskAction.getModel().getData() != null) fail = GORFXTools.failureFromException((Exception) taskAction.getModel().getData()); } else {/*w w w. j a v a 2 s .c om*/ fail.setAllIsFine(new Object()); } return fail; }
From source file:org.slf4j.impl.PiazzaLogger.java
public void info(String format) { processLogs(Severity.INFORMATIONAL, format, new Object()); }
From source file:com.ebay.pulsar.analytics.metricstore.granularity.GranularityTest.java
private void testDruidGranularity() { String d1 = "7200000"; String origin1 = "1970-01-01T00:07:00Z"; DurationGranularity c1 = new DurationGranularity(d1); DurationGranularity c2 = new DurationGranularity(d1); assertArrayEquals(c1.cacheKey(), c2.cacheKey()); c1 = new DurationGranularity(d1, origin1); c2 = new DurationGranularity(d1, origin1); assertArrayEquals(c1.cacheKey(), c2.cacheKey()); assertEquals(d1, c2.getDuration());/*ww w .j a v a 2 s .com*/ assertEquals(origin1, c2.getOrigin()); assertEquals("duration", c2.getType()); c2 = new DurationGranularity(d1); assertTrue(!DigestUtils.shaHex(c1.cacheKey()).equals(DigestUtils.shaHex(c2.cacheKey()))); c2 = new DurationGranularity("7300000", origin1); assertTrue(!DigestUtils.shaHex(c1.cacheKey()).equals(DigestUtils.shaHex(c2.cacheKey()))); c2 = new DurationGranularity("7200000", "1970-01-02T00:07:00Z"); assertTrue(!DigestUtils.shaHex(c1.cacheKey()).equals(DigestUtils.shaHex(c2.cacheKey()))); assertTrue(!c1.equals(null)); c2 = new DurationGranularity(null); assertTrue(!c1.equals(c2)); assertTrue(!c2.equals(c1)); c2 = new DurationGranularity(d1); assertTrue(!c1.equals(c2)); assertTrue(!c2.equals(c1)); c2 = new DurationGranularity(d1, null); assertTrue(!c1.equals(c2)); assertTrue(!c2.equals(c1)); c2 = new DurationGranularity(d1, origin1); assertTrue(c1.equals(c2)); assertTrue(c2.equals(c1)); assertTrue(c1.equals(c1)); assertTrue(c1.hashCode() == c2.hashCode()); assertTrue(!c1.equals(new Object())); }
From source file:edu.illinois.enforcemop.examples.apache.collections.TestBlockingBuffer.java
/** * Tests {@link BlockingBuffer#get()} in combination with {@link BlockingBuffer#addAll(java.util.Collection)}. */// w w w . jav a 2s . com @Test // @Schedules({ // @Schedule(name = "GetWithAddAll", sequence = "[beforeGet:afterGet]@main->beforeAddAll@addAllThread") }) public void testGetWithAddAll() { Buffer blockingBuffer = BlockingBuffer.decorate(new MyBuffer()); Object obj = new Object(); new NonDelayedAddAll(blockingBuffer, obj, "addAllThread").start(); // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer . /* @Event("beforeGet")*/ assertSame("GetWithAddAll", obj, blockingBuffer.get()); /* @Event("afterGet")*/ }
From source file:com.basho.riak.client.query.BucketMapReduce.java
@Override protected void writeInput(JsonGenerator jsonGenerator) throws IOException { if (hasFilters()) { jsonGenerator.writeObject(new Object() { @SuppressWarnings("unused") @JsonProperty//from www . ja v a 2 s.c o m String bucket = getBucket(); @SuppressWarnings("unused") @JsonProperty Collection<Object[]> key_filters = getKeyFilters(); }); } else { jsonGenerator.writeString(bucket); } }
From source file:com.yoncabt.ebr.executor.jasper.JasperReport.java
public static File compileIfRequired(File jrxmlFile) { final String absolutePath = jrxmlFile.getAbsolutePath(); synchronized (compileLocks) { if (!compileLocks.containsKey(absolutePath)) compileLocks.put(absolutePath, new Object()); }//w w w .j a v a 2s . co m synchronized (compileLocks.get(absolutePath)) { try { return compile(jrxmlFile); } catch (JRException ex) { throw new ReportException(ex); } } }
From source file:org.apache.sling.tests.sling_2998.SLING_2998_IT.java
@Test public void testSlingTest() throws Exception { final HttpClient httpClient = HttpClients.createDefault(); final HttpGet httpGet = new HttpGet(baseUri() + "/sling-test/sling/sling-test.html"); final HttpResponse httpResponse = httpClient.execute(httpGet); assertEquals(200, httpResponse.getStatusLine().getStatusCode()); final Dictionary<String, String> properties = new Hashtable<String, String>(); properties.put("sling.auth.requirements", "+/sling-test"); bundleContext.registerService(Object.class.getName(), new Object(), properties); final HttpResponse httpResponseUnauthorized = httpClient.execute(httpGet); assertEquals(401, httpResponseUnauthorized.getStatusLine().getStatusCode()); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("admin", "admin")); final HttpClient authenticatingHttpClient = HttpClients.custom() .setDefaultCredentialsProvider(credentialsProvider).build(); final HttpResponse httpResponseAuthorized = authenticatingHttpClient.execute(httpGet); assertEquals(200, httpResponseAuthorized.getStatusLine().getStatusCode()); }
From source file:com.cloudera.livy.rsc.driver.RSCDriver.java
public RSCDriver(SparkConf conf, RSCConf livyConf) throws Exception { Set<PosixFilePermission> perms = PosixFilePermissions.fromString("rwx------"); this.localTmpDir = Files.createTempDirectory("rsc-tmp", PosixFilePermissions.asFileAttribute(perms)) .toFile();/*from w w w .j a va2 s.c om*/ this.executor = Executors.newCachedThreadPool(); this.jobQueue = new LinkedList<>(); this.clients = new ConcurrentLinkedDeque<>(); this.serializer = new Serializer(); this.conf = conf; this.livyConf = livyConf; this.jcLock = new Object(); this.shutdownLock = new Object(); this.activeJobs = new ConcurrentHashMap<>(); this.bypassJobs = new ConcurrentLinkedDeque<>(); this.idleTimeout = new AtomicReference<>(); }