Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2P API #4

Merged
merged 4 commits into from
May 28, 2020
Merged

P2P API #4

merged 4 commits into from
May 28, 2020

Conversation

bmeike
Copy link
Contributor

@bmeike bmeike commented May 28, 2020

this is PR https://github.com/couchbaselabs/couchbase-lite-java-ee-root/pull/6
but working...

Implementation of the P2P API.

@bmeike bmeike added the enhancement New feature or request label May 28, 2020
@bmeike bmeike requested review from pasin and jayahariv May 28, 2020 20:38
@bmeike bmeike self-assigned this May 28, 2020
}

//@NonNull
public TLSIdentity getIdentity(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing throws CouchbaseLiteException.

}

//@NonNull
public TLSIdentity createIdentity(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing throws CouchbaseLiteException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

}

//@NonNull
public TLSIdentity importIdentity(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing throws CouchbaseLiteException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

return null;
}

public void deleteIdentity(@NonNull String alias) { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing throws CouchbaseLiteException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

@@ -937,7 +937,7 @@ private boolean filterDocument(
long dict,
boolean isPush) {
final ReplicationFilter filter = (isPush) ? config.getPushFilter() : config.getPullFilter();
return filter.filtered(new Document(getDatabase(), docId, revId, new FLDict(dict)), flags);
return (filter != null) && filter.filtered(new Document(getDatabase(), docId, revId, new FLDict(dict)), flags);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

private Date expiration;

@Nullable
protected List<Certificate> getCerts() { return certs; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be public?

@Nullable
protected Date getExpiration() { return expiration; }

protected void setExpiration(@Nullable Date expiration) { this.expiration = expiration; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expiration is readonly.

@Nullable
protected List<Certificate> getCerts() { return certs; }

protected void setCerts(@Nullable List<Certificate> certs) { this.certs = certs; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

certs is readonly.

public class TLSIdentity extends AbstractTLSIdentity {

@Nullable
public TLSIdentity getIdentity(KeyStore keyStore, String alias, byte[] keyPassword) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing throws CouchbaseLiteException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keyPassword is nullable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

return null;
}

public TLSIdentity createIdentity(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing throws CouchbaseLiteException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

public class TLSIdentity extends AbstractTLSIdentity {

@Nullable
public TLSIdentity getIdentity(@NonNull String alias, @Nullable byte[] keyPassword) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

}

//@NonNull
public TLSIdentity createIdentity(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

return null;
}

public void deleteIdentity(@NonNull String alias) { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

}

//@NonNull
public TLSIdentity importIdentity(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be static method.

@bmeike bmeike merged commit 534fb07 into master May 28, 2020
@bmeike
Copy link
Contributor Author

bmeike commented May 28, 2020

All errors repaired.

@bmeike bmeike deleted the p2p/api branch May 28, 2020 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants