Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CodenameOne/src/com/codename1/properties/SQLMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,9 @@ private SelectBuilder(PropertyBase property, String operator, String prefix, Str
this.prefix = prefix;
this.suffix = suffix;
this.parent = parent;
parent.child = this;
if (parent != null) {
parent.child = this;
}
}

/**
Expand Down
3 changes: 3 additions & 0 deletions CodenameOne/src/com/codename1/ui/SideMenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ protected Button createOpenButton() {
* {@inheritDoc}
*/
protected void installMenuBar() {
if (parent == null) {
return;
}
if (parent.getClientProperty("Menu") != null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,9 @@ public void testSelectBuild() throws Exception {
Database db = com.codename1.ui.Display.getInstance().openOrCreate("test.db");
SQLMap sqlMap = SQLMap.create(db);

// This is expected to throw NPE because of broken constructor logic in SelectBuilder
try {
sqlMap.selectBuild();
Assertions.fail("Expected NullPointerException from selectBuild()");
} catch (NullPointerException e) {
// Expected
}
// This was expected to throw NPE because of broken constructor logic in SelectBuilder
// But we fixed it, so now it should work.
SQLMap.SelectBuilder builder = sqlMap.selectBuild();
Assertions.assertNotNull(builder);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public void showAuthentication(ActionListener al) {
login.setOauth2URL("url");
login.setRedirectURI("uri");

login.doLogin();
com.codename1.junit.TestLogger.install();
try {
login.doLogin();
} finally {
com.codename1.junit.TestLogger.remove();
}
}
}
Loading