Commit 2b44971c authored by Philippe Coval's avatar Philippe Coval Committed by Gerrit Code Review

Merge "Merge branch '1.3-rel' (c22b1d43)"

parents ffad5c66 4ac85a74
......@@ -21,7 +21,6 @@
*/
package org.iotivity.cloud.accountserver.db;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
......@@ -50,19 +49,6 @@ public class MongoDB {
private MongoClient mongoClient = null;
private MongoDatabase db = null;
/**
* API creating MongoClient and initializing MongoDatabase
*
* @param dbname
* database name to create MongoDatabase
* @throws Exception
*/
public MongoDB(String dbname) throws Exception {
mongoClient = new MongoClient(InetAddress.getLocalHost().getHostAddress());
mongoClient.dropDatabase(dbname);
db = mongoClient.getDatabase(dbname);
}
/**
* API creating MongoClient and initializing MongoDatabase
*
......
......@@ -66,7 +66,7 @@ public class AccountResourceTest {
private static final String REGISTER_URI = Constants.ACCOUNT_FULL_URI;
private static final String GROUP_URI = Constants.GROUP_FULL_URI;
private static final String DEVICE_ID = "DEVICE";
private String mAuthProvider = "Github";
private String mAuthProvider = "github";
private String mAuthCode = "3af038b49edc4ebdc45c";
private CoapDevice mMockDevice = mock(
CoapDevice.class);
......@@ -112,7 +112,7 @@ public class AccountResourceTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.TOKEN_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
......
......@@ -106,7 +106,7 @@ public class SessionResourceTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.TOKEN_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
......@@ -362,7 +362,7 @@ public class SessionResourceTest {
}
private void resetDB() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.GROUP_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
mongoDB.deleteTable(Constants.USER_TABLE);
......
......@@ -64,7 +64,7 @@ public class TokenRefreshResourceTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.TOKEN_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
......
......@@ -83,7 +83,7 @@ public class GroupAclManagerTest {
AclResource.getInstance().deleteAcl((String) AclResource.getInstance()
.getAclid(mDi2).get(Constants.KEYFIELD_ACLID));
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.GROUP_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
mongoDB.deleteTable(Constants.ACL_TABLE);
......
......@@ -78,7 +78,7 @@ public class GroupBrokerTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.TOKEN_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
......@@ -189,7 +189,7 @@ public class GroupBrokerTest {
}
private void resetDB() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.GROUP_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
mongoDB.deleteTable(Constants.USER_TABLE);
......
......@@ -108,7 +108,7 @@ public class GroupResourceTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.deleteTable(Constants.TOKEN_TABLE);
......@@ -824,7 +824,7 @@ public class GroupResourceTest {
}
public void resetDB() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.GROUP_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
mongoDB.deleteTable(Constants.USER_TABLE);
......
......@@ -54,7 +54,8 @@ import org.mockito.stubbing.Answer;
public class AclIdResourceTest {
private static final String ACL_ID_URI = Constants.ACL_ID_FULL_URI;
final CountDownLatch mLatch = new CountDownLatch(1);
final CountDownLatch mLatch = new CountDownLatch(
1);
private final String mDeviceUuid = "9cfbeb8e-5a1e-4d1c-9d01-2ae6fdb";
private final String mOwnerUuid = "123e4567-e89b-12d3-a456-4266554";
private final String mSubjectUuid = "72616E64-5069-6E44-6576-5575696";
......@@ -67,7 +68,8 @@ public class AclIdResourceTest {
private final String mResourceIf = "oic.if.baseline";
private String mAceId = "a0001";
private String mAclId = "987e6543-e21b-12d3-a456-4266554";
private CoapDevice mMockDevice = Mockito.mock(CoapDevice.class);
private CoapDevice mMockDevice = Mockito
.mock(CoapDevice.class);
private Cbor<HashMap<String, Object>> mCbor = new Cbor<>();
private IResponse mResponse = null;
private AclResource mAclResource = new AclResource();
......@@ -79,14 +81,18 @@ public class AclIdResourceTest {
resetDB();
Mockito.doAnswer(new Answer<Object>() {
@Override
public CoapResponse answer(InvocationOnMock invocation) throws Throwable {
public CoapResponse answer(InvocationOnMock invocation)
throws Throwable {
Object[] args = invocation.getArguments();
CoapResponse resp = (CoapResponse) args[0];
System.out.println("\t----------payload : " + resp.getPayloadString());
System.out.println(
"\t----------payload : " + resp.getPayloadString());
System.out.println("\t---------method : " + resp.getStatus());
mResponse = resp;
if (mAclId == null) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(resp.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(resp.getPayload(),
HashMap.class);
if (payloadData.containsKey("aclid")) {
mAclId = (String) payloadData.get("aclid");
}
......@@ -99,7 +105,7 @@ public class AclIdResourceTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.ACL_TABLE);
mongoDB.createTable(Constants.TOKEN_TABLE);
......@@ -184,7 +190,8 @@ public class AclIdResourceTest {
assertTrue(mLatch.await(2L, SECONDS));
}
private void createAclId(CoapDevice device, String di, String oid) throws Exception {
private void createAclId(CoapDevice device, String di, String oid)
throws Exception {
System.out.println("-----Create Acl Id");
IRequest request = null;
request = createAclIdRequest(oid, di);
......@@ -212,21 +219,24 @@ public class AclIdResourceTest {
mAclResource.onDefaultRequestReceived(device, request);
}
private void addIndividualAce(CoapDevice device, String aclId) throws Exception {
private void addIndividualAce(CoapDevice device, String aclId)
throws Exception {
System.out.println("-----Add Individual Ace");
IRequest request = null;
request = addIndividualAceRequest(aclId);
mAclResource.onDefaultRequestReceived(device, request);
}
private void updateIndividualAce(CoapDevice device, String aclId, String aceId) throws Exception {
private void updateIndividualAce(CoapDevice device, String aclId,
String aceId) throws Exception {
System.out.println("-----Update Individual Acl Ace");
IRequest request = null;
request = updateIndividualAceRequest(aclId, aceId);
mAclResource.onDefaultRequestReceived(device, request);
}
private void deleteIndividualAclAce(CoapDevice device, String aclId, String aceId) throws Exception {
private void deleteIndividualAclAce(CoapDevice device, String aclId,
String aceId) throws Exception {
System.out.println("-----Delete Individual Acl Ace");
IRequest request = null;
request = deleteIndividualAclAceRequest(aclId, aceId);
......@@ -235,27 +245,32 @@ public class AclIdResourceTest {
private IRequest getAclIdRequest(String deviceUuid) {
IRequest request = null;
request = MessageBuilder.createRequest(RequestMethod.GET, ACL_ID_URI, "di=" + deviceUuid);
request = MessageBuilder.createRequest(RequestMethod.GET, ACL_ID_URI,
"di=" + deviceUuid);
((CoapRequest) request).setObserve(Observe.SUBSCRIBE);
return request;
}
private IRequest createAclIdRequest(String oid, String di) {
IRequest request = null;
String uriQuery = Constants.REQ_OWNER_ID + "=" + oid + ";" + Constants.REQ_DEVICE_ID + "=" + di;
request = MessageBuilder.createRequest(RequestMethod.PUT, ACL_ID_URI, uriQuery);
String uriQuery = Constants.REQ_OWNER_ID + "=" + oid + ";"
+ Constants.REQ_DEVICE_ID + "=" + di;
request = MessageBuilder.createRequest(RequestMethod.PUT, ACL_ID_URI,
uriQuery);
return request;
}
private IRequest deleteAclIdRequest(String aclId) {
IRequest request = null;
request = MessageBuilder.createRequest(RequestMethod.DELETE, ACL_ID_URI, "aclid=" + aclId);
request = MessageBuilder.createRequest(RequestMethod.DELETE, ACL_ID_URI,
"aclid=" + aclId);
return request;
}
private IRequest getIndividualAclRequest(String aclId) {
IRequest request = null;
request = MessageBuilder.createRequest(RequestMethod.GET, ACL_ID_URI + "/" + aclId, null);
request = MessageBuilder.createRequest(RequestMethod.GET,
ACL_ID_URI + "/" + aclId, null);
((CoapRequest) request).setObserve(Observe.NOTHING);
return request;
}
......@@ -283,8 +298,9 @@ public class AclIdResourceTest {
HashMap<String, Object> payload = new HashMap<>();
payload.put(Constants.REQ_ACL_LIST, Arrays.asList(acelist));
return MessageBuilder.createRequest(RequestMethod.POST, ACL_ID_URI + "/" + aclId, null,
ContentFormat.APPLICATION_CBOR, mCbor.encodingPayloadToCbor(payload));
return MessageBuilder.createRequest(RequestMethod.POST,
ACL_ID_URI + "/" + aclId, null, ContentFormat.APPLICATION_CBOR,
mCbor.encodingPayloadToCbor(payload));
}
private IRequest updateIndividualAceRequest(String aclId, String aceId) {
......@@ -310,18 +326,22 @@ public class AclIdResourceTest {
HashMap<String, Object> payload = new HashMap<>();
payload.put(Constants.REQ_ACL_LIST, Arrays.asList(acelist));
return MessageBuilder.createRequest(RequestMethod.POST, ACL_ID_URI + "/" + aclId, "aceid=" + aceId,
ContentFormat.APPLICATION_CBOR, mCbor.encodingPayloadToCbor(payload));
return MessageBuilder.createRequest(RequestMethod.POST,
ACL_ID_URI + "/" + aclId, "aceid=" + aceId,
ContentFormat.APPLICATION_CBOR,
mCbor.encodingPayloadToCbor(payload));
}
private IRequest deleteIndividualAclAceRequest(String aclId, String aceId) {
IRequest request = null;
request = MessageBuilder.createRequest(RequestMethod.DELETE, ACL_ID_URI + "/" + aclId, "aceid=" + aceId);
request = MessageBuilder.createRequest(RequestMethod.DELETE,
ACL_ID_URI + "/" + aclId, "aceid=" + aceId);
return request;
}
private void hashmapGetAclId(IResponse response, String propertyName) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(response.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(response.getPayload(), HashMap.class);
if (payloadData.containsKey(propertyName)) {
mAclId = (String) payloadData.get(propertyName);
......@@ -330,16 +350,19 @@ public class AclIdResourceTest {
}
private void hashmapGetAceId(IResponse response, String propertyName) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(response.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(response.getPayload(), HashMap.class);
if (payloadData.containsKey("aclist")) {
List<HashMap<String, Object>> aclist = (List<HashMap<String, Object>>) payloadData.get("aclist");
List<HashMap<String, Object>> aclist = (List<HashMap<String, Object>>) payloadData
.get("aclist");
mAceId = (String) aclist.get(0).get(propertyName);
System.out.println("hashmapGetAceId getace " + mAceId);
}
}
private boolean hashmapCheck(IResponse response, String propertyName) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(response.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(response.getPayload(), HashMap.class);
if (payloadData.containsKey(propertyName)) {
return true;
} else {
......@@ -347,7 +370,8 @@ public class AclIdResourceTest {
}
}
private boolean methodCheck(IResponse response, ResponseStatus responseStatus) {
private boolean methodCheck(IResponse response,
ResponseStatus responseStatus) {
if (responseStatus == response.getStatus()) {
return true;
} else {
......@@ -362,7 +386,7 @@ public class AclIdResourceTest {
}
public void resetDB() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.GROUP_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
mongoDB.deleteTable(Constants.ACL_TABLE);
......
......@@ -85,7 +85,7 @@ public class InviteResourceTest {
mResponse = null;
// reset data base
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.INVITE_TABLE);
mongoDB.createTable(Constants.INVITE_TABLE);
......
......@@ -34,7 +34,6 @@ import org.iotivity.cloud.accountserver.Constants;
import org.iotivity.cloud.accountserver.db.MongoDB;
import org.iotivity.cloud.accountserver.resources.acl.id.AclResource;
import org.iotivity.cloud.base.device.CoapDevice;
import org.iotivity.cloud.base.protocols.IRequest;
import org.iotivity.cloud.base.protocols.IResponse;
import org.iotivity.cloud.base.protocols.MessageBuilder;
......@@ -56,7 +55,8 @@ import org.mockito.stubbing.Answer;
public class AclVerifyResourceTest {
private static final String ACL_ID_URI = Constants.ACL_ID_FULL_URI;
private static final String ACL_VERIFY_URI = Constants.ACL_VERIFY_FULL_URI;
final CountDownLatch mLatch = new CountDownLatch(1);
final CountDownLatch mLatch = new CountDownLatch(
1);
private final String mDeviceUuid = "9cfbeb8e-5a1e-4d1c-9d01-2ae6fdb";
private final String mOwnerUuid = "123e4567-e89b-12d3-a456-4266554";
private final String mSubjectUuid = "72616E64-5069-6E44-6576-5575696";
......@@ -67,7 +67,8 @@ public class AclVerifyResourceTest {
private final String mResourceType = "core.light";
private final String mResourceIf = "oic.if.baseline";
private String mAclId = "987e6543-e21b-12d3-a456-4266554";
private CoapDevice mMockDevice = Mockito.mock(CoapDevice.class);
private CoapDevice mMockDevice = Mockito
.mock(CoapDevice.class);
private Cbor<HashMap<String, Object>> mCbor = new Cbor<>();
private IResponse mResponse = null;
private AclVerifyResource mAclVerifyResource = new AclVerifyResource();
......@@ -80,14 +81,18 @@ public class AclVerifyResourceTest {
resetDB();
Mockito.doAnswer(new Answer<Object>() {
@Override
public CoapResponse answer(InvocationOnMock invocation) throws Throwable {
public CoapResponse answer(InvocationOnMock invocation)
throws Throwable {
Object[] args = invocation.getArguments();
CoapResponse resp = (CoapResponse) args[0];
System.out.println("\t----------payload : " + resp.getPayloadString());
System.out.println(
"\t----------payload : " + resp.getPayloadString());
System.out.println("\t---------method : " + resp.getStatus());
mResponse = resp;
if (mAclId == null) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(resp.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(resp.getPayload(),
HashMap.class);
if (payloadData.containsKey("aclid")) {
mAclId = (String) payloadData.get("aclid");
}
......@@ -100,7 +105,7 @@ public class AclVerifyResourceTest {
@After
public void resetAccountDatabase() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.createTable(Constants.USER_TABLE);
mongoDB.createTable(Constants.ACL_TABLE);
mongoDB.createTable(Constants.TOKEN_TABLE);
......@@ -113,13 +118,15 @@ public class AclVerifyResourceTest {
createAclId(mMockDevice, mDeviceUuid, mOwnerUuid);
hashmapGetAclId(mResponse, "aclid");
addIndividualAce(mMockDevice, mAclId);
verifyAcl(mMockDevice, mSubjectUuid, mDeviceUuid, mRmType, mResourceUri);
verifyAcl(mMockDevice, mSubjectUuid, mDeviceUuid, mRmType,
mResourceUri);
assertTrue(methodCheck(mResponse, ResponseStatus.CONTENT));
assertTrue(hashmapCheck(mResponse, "gp"));
assertTrue(mLatch.await(2L, SECONDS));
}
private void createAclId(CoapDevice device, String di, String oid) throws Exception {
private void createAclId(CoapDevice device, String di, String oid)
throws Exception {
System.out.println("-----Create Acl Id");
IRequest request = null;
request = createAclIdRequest(oid, di);
......@@ -128,12 +135,15 @@ public class AclVerifyResourceTest {
private IRequest createAclIdRequest(String oid, String di) {
IRequest request = null;
String uriQuery = Constants.REQ_OWNER_ID + "=" + oid + ";" + Constants.REQ_DEVICE_ID + "=" + di;
request = MessageBuilder.createRequest(RequestMethod.PUT, ACL_ID_URI, uriQuery);
String uriQuery = Constants.REQ_OWNER_ID + "=" + oid + ";"
+ Constants.REQ_DEVICE_ID + "=" + di;
request = MessageBuilder.createRequest(RequestMethod.PUT, ACL_ID_URI,
uriQuery);
return request;
}
private void addIndividualAce(CoapDevice device, String aclId) throws Exception {
private void addIndividualAce(CoapDevice device, String aclId)
throws Exception {
System.out.println("-----Add Individual Ace");
IRequest request = null;
request = addIndividualAceRequest(aclId);
......@@ -163,28 +173,34 @@ public class AclVerifyResourceTest {
HashMap<String, Object> payload = new HashMap<>();
payload.put(Constants.REQ_ACL_LIST, Arrays.asList(acelist));
return MessageBuilder.createRequest(RequestMethod.POST, ACL_ID_URI + "/" + aclId, null,
ContentFormat.APPLICATION_CBOR, mCbor.encodingPayloadToCbor(payload));
return MessageBuilder.createRequest(RequestMethod.POST,
ACL_ID_URI + "/" + aclId, null, ContentFormat.APPLICATION_CBOR,
mCbor.encodingPayloadToCbor(payload));
}
private void verifyAcl(CoapDevice device, String subjectUuid, String di, String rm, String uri) throws Exception {
private void verifyAcl(CoapDevice device, String subjectUuid, String di,
String rm, String uri) throws Exception {
System.out.println("-----Verify Acl");
IRequest request = null;
request = verifyAclRequest(subjectUuid, di, rm, uri);
mAclVerifyResource.onDefaultRequestReceived(device, request);
}
private IRequest verifyAclRequest(String subjectUuid, String di, String rm, String uri) {
private IRequest verifyAclRequest(String subjectUuid, String di, String rm,
String uri) {
IRequest request = null;
String queryUrl = "sid=" + subjectUuid + ";di=" + di + ";rm=" + rm + ";uri=" + uri;
String queryUrl = "sid=" + subjectUuid + ";di=" + di + ";rm=" + rm
+ ";uri=" + uri;
System.out.println(queryUrl);
request = MessageBuilder.createRequest(RequestMethod.GET, ACL_VERIFY_URI, queryUrl);
request = MessageBuilder.createRequest(RequestMethod.GET,
ACL_VERIFY_URI, queryUrl);
((CoapRequest) request).setObserve(Observe.SUBSCRIBE);
return request;
}
private void hashmapGetAclId(IResponse response, String propertyName) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(response.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(response.getPayload(), HashMap.class);
if (payloadData.containsKey(propertyName)) {
mAclId = (String) payloadData.get(propertyName);
......@@ -193,7 +209,8 @@ public class AclVerifyResourceTest {
}
private boolean hashmapCheck(IResponse response, String propertyName) {
HashMap<String, Object> payloadData = mCbor.parsePayloadFromCbor(response.getPayload(), HashMap.class);
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(response.getPayload(), HashMap.class);
if (payloadData.containsKey(propertyName)) {
return true;
} else {
......@@ -201,7 +218,8 @@ public class AclVerifyResourceTest {
}
}
private boolean methodCheck(IResponse response, ResponseStatus responseStatus) {
private boolean methodCheck(IResponse response,
ResponseStatus responseStatus) {
if (responseStatus == response.getStatus()) {
return true;
} else {
......@@ -216,7 +234,7 @@ public class AclVerifyResourceTest {
}
public void resetDB() throws Exception {
MongoDB mongoDB = new MongoDB(Constants.DB_NAME);
MongoDB mongoDB = new MongoDB("127.0.0.1", Constants.DB_NAME);
mongoDB.deleteTable(Constants.GROUP_TABLE);
mongoDB.createTable(Constants.GROUP_TABLE);
mongoDB.deleteTable(Constants.ACL_TABLE);
......
......@@ -28,6 +28,7 @@
if (!(arg)) \
{ \
ThrowOcException(exc, log_message); \
return; \
} \
JniOcAccountManager::JniOcAccountManager(std::shared_ptr<OCAccountManager> accountManager)
......@@ -70,7 +71,6 @@ OCConnectivityType JniOcAccountManager::connectivityType() const
}
std::shared_ptr<OCAccountManager> JniOcAccountManager::getOcAccountManagerObject() const
{
return m_sharedAccountManager;
}
......
......@@ -234,7 +234,7 @@ IPCAStatus OCFFramework::Start(const IPCAAppInfoInternal& appInfo, bool isUnitTe
if (ret != OIC_PLATFORM_OK)
{
OIC_LOG_V(FATAL, TAG,
"Failed to get persistent storage path from OICGetLocalAppDataPath, ret: %"PRIuPTR,
"Failed to get persistent storage path from OICGetLocalAppDataPath, ret: %" PRIuPTR,
static_cast<size_t>(ret));
OICFree(psPath);
return IPCA_FAIL;
......@@ -252,7 +252,7 @@ IPCAStatus OCFFramework::Start(const IPCAAppInfoInternal& appInfo, bool isUnitTe
if (ret != OIC_PLATFORM_NOTIMPL)
{
OIC_LOG_V(FATAL, TAG,
"Failed to get path length from OICGetLocalAppDataPath, ret: %"PRIuPTR,
"Failed to get path length from OICGetLocalAppDataPath, ret: %" PRIuPTR,
static_cast<size_t>(ret));
// An error occurred, fail
return IPCA_FAIL;
......
......@@ -25,7 +25,7 @@
OICPlatformResult_t OICGetLocalAppDataPath(char* buffer, size_t* bufferLen)
{
OIC_LOG(WARNING, TAG, "Unsupported platform.");
OIC_LOG(INFO, TAG, "OICGetLocalAppDataPath: Unsupported platform.");
OC_UNUSED(buffer);
OC_UNUSED(bufferLen);
return OIC_PLATFORM_NOTIMPL;
......@@ -33,7 +33,7 @@ OICPlatformResult_t OICGetLocalAppDataPath(char* buffer, size_t* bufferLen)
OICPlatformResult_t OICGetTempAppDataPath(char* buffer, size_t* bufferLen)
{
OIC_LOG(WARNING, TAG, "Unsupported platform.");
OIC_LOG(INFO, TAG, "OICGetTempAppDataPath: Unsupported platform.");
OC_UNUSED(buffer);
OC_UNUSED(bufferLen);
return OIC_PLATFORM_NOTIMPL;
......
......@@ -201,7 +201,7 @@ static OICPlatformResult_t GetSysLocalAppDataPath(std::string &path, size_t &sys
sysPathLen = path.length();
#else // UWP_APP
// Unsupported for win32 apps
OIC_LOG(WARNING, TAG, "Unsupported platform.");
OIC_LOG(INFO, TAG, "GetSysLocalAppDataPath: Unsupported platform.");
OC_UNUSED(path);
OC_UNUSED(sysPathLen);
OC_UNUSED(getTempDir);
......@@ -232,8 +232,11 @@ static OICPlatformResult_t GetLocalAppDataPath(std::string &path, bool getTempDi
// Set path to the appropriate system local or temp application data path
if (ret != OIC_PLATFORM_OK)