commit | d306bdc96badcb44b5d76f068c3a38064c242759 | [log] [tgz] |
---|---|---|
author | Diwas Sharma <sdiwas@google.com> | Fri May 17 16:52:49 2024 +0000 |
committer | Diwas Sharma <sdiwas@google.com> | Fri May 17 16:52:49 2024 +0000 |
tree | bfe5fef83bf9ea322f8ac511d06ee3f809a339eb | |
parent | 3bcaeafe943411543f051b8142b62ffe45589356 [diff] |
Add a dedicated Mainline Test Mapping group for Adservices Test of *all* Mainline modules are currently configured in a single `mainline-presubmit` Test Mapping group. This requires that users indicate the module to install in every entry and is quite tedious. The above approach also adds overhead due to installing, checking for, and uninstalling Mainline modules between test module executions. This eats up precious presubmit time and gets runtimes close to violating the SLO. This change moves all Adservices Mainline module tests into a dedicated Test Mapping group that installs the Mainline module once before executing all test modules. This also simplifies the configuration syntax by no longer requiring brackets that indicate the, now implicit, Mainline module. Test: presubmit runs Bug: 328102821 Change-Id: Iba2391a1d0c3f8ffe313588a89efdfcccd957593
A Java 7 implementation of RFC 7049: Concise Binary Object Representation (CBOR)
Add this to the dependencies section of your pom.xml file:
<dependency> <groupId>co.nstant.in</groupId> <artifactId>cbor</artifactId> <version>0.8</version> </dependency>
ByteArrayOutputStream baos = new ByteArrayOutputStream(); new CborEncoder(baos).encode(new CborBuilder() .add("text") // add string .add(1234) // add integer .add(new byte[] { 0x10 }) // add byte array .addArray() // add array .add(1) .add("text") .end() .build()); byte[] encodedBytes = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(encodedBytes); List<DataItem> dataItems = new CborDecoder(bais).decode(); for(DataItem dataItem : dataItems) { // process data item }
ByteArrayInputStream bais = new ByteArrayInputStream(encodedBytes); new CborDecoder(bais).decode(new DataItemListener() { @Override public void onDataItem(DataItem dataItem) { // process data item } });
This project uses the C4 process for all code changes.
Copyright 2013-2017 Constantin Rack Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.