Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c1d9d4d
Break ground on #531 by printing out the names of the .out files that…
DavidWhitlock Jan 30, 2026
8b01f95
Begin adding new capabilities to the `FineUngradedSubmission` tool th…
DavidWhitlock Feb 1, 2026
6b6cd1e
More progress on detecting graded project submissions whose grades ha…
DavidWhitlock Feb 1, 2026
f54e22a
Add some imports.
DavidWhitlock Feb 1, 2026
7da8fda
Add a couple more tests.
DavidWhitlock Feb 3, 2026
1d1a70b
Main method parses grade book so that we can determine which project …
DavidWhitlock Feb 3, 2026
cefe4cd
Identify graded projects whose grades have not been recorded.
DavidWhitlock Feb 7, 2026
4cc8068
Identify graded projects whose grades have not been recorded.
DavidWhitlock Feb 7, 2026
7451dd5
Extracted the logic for extracting a project submission's score into …
DavidWhitlock Feb 8, 2026
c590d1e
Parse the project name from the tested project submission output file.
DavidWhitlock Feb 8, 2026
63b5c2d
Determine if an ungraded tested project submission output file has be…
DavidWhitlock Feb 8, 2026
0bf6282
Parse the submission time from the tested project submission output f…
DavidWhitlock Feb 8, 2026
cdab40f
Got FindUngradedSubmissionsTest working with TestedProjectSubmissionO…
DavidWhitlock Feb 8, 2026
37d5faa
Refactor to remove duplicate code.
DavidWhitlock Feb 8, 2026
0e94a41
Finally note that a reviewed submission without a grade does not need…
DavidWhitlock Feb 8, 2026
8654cc2
Handle the project name for the koans project.
DavidWhitlock Feb 8, 2026
b4380dd
Identify the name of the Android project.
DavidWhitlock Mar 17, 2026
45cc2fe
SNAPSHOT versions for Summer 2026.
DavidWhitlock Apr 25, 2026
77674ed
Merge branch 'Summer2026-SNAPSHOT' into issue-531/improve-find-ungrad…
DavidWhitlock Apr 25, 2026
169d5ad
Use Summer 2026 SNAPSHOT version of Koans library.
DavidWhitlock Apr 25, 2026
281bdcb
If there is a submission for a student that is no longer in the grade…
DavidWhitlock Apr 25, 2026
a3b2d09
If there is a submission for a student that is no longer in the grade…
DavidWhitlock Apr 25, 2026
ac79179
H2 Database tools no longer print stack traces when an error occurs.
DavidWhitlock Apr 25, 2026
c13dbd2
Add an integration test for PhoneBillDAO to increase code coverage.
DavidWhitlock Apr 25, 2026
7d3adf4
Merge pull request #533 from JoyOfCodingPDX/issue-531/improve-find-un…
DavidWhitlock Apr 25, 2026
f212516
Merge pull request #538 from JoyOfCodingPDX/issue-535/h2-tools-no-dum…
DavidWhitlock Apr 25, 2026
51539f8
Merge pull request #539 from JoyOfCodingPDX/issue-532/PhoneBillDAO-in…
DavidWhitlock Apr 25, 2026
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
8 changes: 4 additions & 4 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<parent>
<artifactId>joy</artifactId>
<groupId>io.github.davidwhitlock.joy</groupId>
<version>1.2.4</version>
<version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>examples</artifactId>
<name>examples</name>
<version>1.4.0</version>
<version>1.4.1-SNAPSHOT</version>
<url>https://www.cs.pdx.edu/~whitlock</url>
<dependencies>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>3.0.4</version>
<version>3.0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
Expand Down Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>3.0.4</version>
<version>3.0.5-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,17 @@ public void testCountQuery() {
assertThat(output, containsString("4"));
assertThat(output, containsString("1 row(s) returned"));
}
}

@Test
@Order(15)
public void testInvalidStatementPrintsErrorWithoutStackTrace() {
MainMethodResult result = invokeMain(ExecuteH2DatabaseStatement.class, dbFilePath,
"SELECT * FROM customers");
String errorOutput = result.getTextWrittenToStandardError();

assertThat(errorOutput, containsString("Error:"));
assertThat(errorOutput, containsString("Table \"CUSTOMERS\" not found"));
assertThat(errorOutput, not(containsString("Exception in thread")));
assertThat(errorOutput, not(containsString("\tat ")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.sql.Connection;
import java.sql.SQLException;
import java.time.LocalDate;
Expand Down Expand Up @@ -183,4 +185,16 @@ public void testDatabaseFilePathIsDisplayed() {
assertThat(output, containsString("Reading schema from H2 database:"));
assertThat(output, containsString(dbFilePath));
}

@Test
public void testInvalidDatabasePathPrintsErrorWithoutStackTrace(@TempDir Path tempDirectory) {
String invalidDatabasePath = tempDirectory.resolve("missing-db").toAbsolutePath() + ";IFEXISTS=TRUE";

MainMethodResult result = invokeMain(PrintH2DatabaseSchema.class, invalidDatabasePath);
String errorOutput = result.getTextWrittenToStandardError();

assertThat(errorOutput, containsString("Error:"));
assertThat(errorOutput, not(containsString("Exception in thread")));
assertThat(errorOutput, not(containsString("\tat ")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ public class ExecuteH2DatabaseStatement {
* Main method that takes a database file path and SQL statement as arguments.
*
* @param args command line arguments: args[0] = database file path, args[1] = SQL statement
* @throws SQLException if a database error occurs
*/
public static void main(String[] args) throws SQLException {
public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Missing required arguments");
System.err.println("Usage: java ExecuteH2DatabaseStatement <database-file-path> <sql-statement>");
Expand All @@ -39,6 +38,8 @@ public static void main(String[] args) throws SQLException {

try (Connection connection = H2DatabaseHelper.createFileBasedConnection(dbFile)) {
executeStatement(connection, sqlStatement);
} catch (SQLException ex) {
System.err.println("Error: " + ex.getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ private static void printIndexes(DatabaseMetaData metaData, String tableName) th
* Main method that takes a database file path and prints the schema.
*
* @param args command line arguments where args[0] is the path to the H2 database file
* @throws SQLException if a database error occurs
*/
public static void main(String[] args) throws SQLException {
public static void main(String[] args) {
if (args.length < 1) {
System.err.println("Missing database file path argument");
System.err.println("Usage: java PrintH2DatabaseSchema <database-file-path>");
Expand All @@ -212,6 +211,8 @@ public static void main(String[] args) throws SQLException {

try (Connection connection = H2DatabaseHelper.createFileBasedConnection(dbFile)) {
printDatabaseSchema(connection);
} catch (SQLException ex) {
System.err.println("Error: " + ex.getMessage());
}
}
}
8 changes: 4 additions & 4 deletions family/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
<parent>
<artifactId>joy</artifactId>
<groupId>io.github.davidwhitlock.joy</groupId>
<version>1.2.4</version>
<version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>family</artifactId>
<packaging>jar</packaging>
<version>1.1.6</version>
<version>1.1.7-SNAPSHOT</version>
<name>Family Tree Application</name>
<description>An Family Tree application for The Joy of Coding</description>
<url>https://www.cs.pdx.edu/~whitlock</url>
<dependencies>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>3.0.4</version>
<version>3.0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>examples</artifactId>
<version>1.4.0</version>
<version>1.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand Down
Loading
Loading