Example usage for java.lang Object Object

List of usage examples for java.lang Object Object

Introduction

In this page you can find the example usage for java.lang Object Object.

Prototype

@HotSpotIntrinsicCandidate
public Object() 

Source Link

Document

Constructs a new object.

Usage

From source file:UuidUtil.java

public static String generateUuid() {
    return generateUuid(new Object());
}

From source file:me.ferrybig.javacoding.webmapper.test.session.DefaultDataStorageTest.java

@Test
public void getDataAsSupportsOneBackendDownCastTypeTest() {
    data.setData(Collections.singleton(new Object()));
    assertEquals(null, extr(data.getDataAs(BigInteger.class)));
}

From source file:SimplePool.java

public SimplePool(int size, int max) {
    this.max = max;
    pool = new Object[size];
    this.last = size - 1;
    lock = new Object();
}

From source file:com.github.danzx.zekke.domain.UserTest.java

@Test
public void shouldEqualsBeFalseWhenComparingWithDifferentObject() {
    assertThat(TEST_USER.equals(new Object())).isFalse();
}

From source file:com.brienwheeler.lib.monitor.telemetry.impl.TelemetryInfoJsonLoggerTest.java

@Test
public void testAlreadyFormatted() {
    TelemetryInfo telemetryInfo = new TelemetryInfo(NAME);
    telemetryInfo.setProcessedVersion(TelemetryInfoJsonSerializer.VERSION_NAME, new Object());
    telemetryInfo.publish();/*  w  ww.  ja va 2 s  . co  m*/
    TelemetryInfoJsonLogger telemetryInfoJsonLogger = new TelemetryInfoJsonLogger();
    telemetryInfoJsonLogger.process(telemetryInfo);
}

From source file:com.github.jknack.handlebars.InheritanceTest.java

@Test
public void inheritance() throws IOException {
    try {//from w ww.  j a  v  a2s.co  m
        Template template = handlebars.compile(name);
        CharSequence result = template.apply(new Object());
        String expected = FileUtils
                .readFileToString(new File("src/test/resources/inheritance/" + name + ".expected"));
        assertEquals(expected, result);
    } catch (HandlebarsException ex) {
        Handlebars.error(ex.getMessage());
        throw ex;
    }
}

From source file:net.pms.io.OutputTextConsumer.java

public OutputTextConsumer(InputStream inputStream, boolean log) {
    super(inputStream);
    linesLock = new Object();
    this.log = log;
}

From source file:edu.xjtu.qxcamerabridge.Qx10ServiceDelegatorImpl.java

/**
 * Test Passed on Qx10/*  ww w.ja  v  a 2  s .  co m*/
 *
 * @return
 */
@Override
public ShootMode getShootMode() {
    String service = "camera";
    String serviceName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    JSONObject replyJson = JSONActionWrapper.jsonrpc(service, serviceName, new ArrayList<>());
    JSONArray modeArray = replyJson.getJSONArray("result");
    return ShootMode.valueOf(modeArray.getString(0));
}

From source file:com.comcast.cats.service.util.HttpClientUtil.java

public static synchronized Object getForObject(String uri, Map<String, String> paramMap) {
    Object responseObject = new Object();

    HttpMethod httpMethod = new GetMethod(uri);

    if ((null != paramMap) && (!paramMap.isEmpty())) {
        httpMethod.setQueryString(getNameValuePair(paramMap));
    }/*from  w  ww . j a  va2s.  c  om*/

    Yaml yaml = new Yaml();

    HttpClient client = new HttpClient();
    InputStream responseStream = null;
    Reader inputStreamReader = null;

    try {
        int responseCode = client.executeMethod(httpMethod);

        if (HttpStatus.SC_OK != responseCode) {
            logger.error("[ REQUEST  ] " + httpMethod.getURI().toString());
            logger.error("[ METHOD   ] " + httpMethod.getName());
            logger.error("[ STATUS   ] " + responseCode);
        } else {
            logger.trace("[ REQUEST  ] " + httpMethod.getURI().toString());
            logger.trace("[ METHOD   ] " + httpMethod.getName());
            logger.trace("[ STATUS   ] " + responseCode);
        }

        responseStream = httpMethod.getResponseBodyAsStream();
        inputStreamReader = new InputStreamReader(responseStream, VideoRecorderServiceConstants.UTF);
        responseObject = yaml.load(inputStreamReader);
    } catch (IOException ioException) {
        ioException.printStackTrace();
    } finally {
        cleanUp(inputStreamReader, responseStream, httpMethod);
    }

    return responseObject;
}

From source file:net.dv8tion.jda.bot.utils.cache.impl.ShardCacheViewImpl.java

public ShardCacheViewImpl() {
    this.elements = new TSynchronizedIntObjectMap<>(new TIntObjectHashMap<>(), new Object());
}