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

JDO-845: Update JDO dependencies #98

Merged
merged 2 commits into from
Nov 19, 2024
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
79 changes: 79 additions & 0 deletions api/src/main/java/javax/jdo/Constants.java

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions api/src/main/java/javax/jdo/Enhancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ public class Enhancer {

/** New Line */
private static final char NL = '\n'; // NOI18N

/** Jar file suffix */
private static final String JAR_FILE_SUFFIX = ".jar"; // NOI18N

/** JDO Metadata file suffix */
private static final String JDO_FILE_SUFFIX = ".jdo"; // NOI18N

/** Class file suffix */
private static final String CLASS_FILE_SUFFIX = ".class"; // NOI18N

Expand All @@ -92,37 +95,52 @@ public class Enhancer {

/** Error indicator */
private boolean error = false;

/** If set, process parameters, print usage, and exit. */
private boolean printAndExit = false;

/** Persistence Units */
private final List<String> persistenceUnitNames = new ArrayList<>();

/** Target Directory Parameter */
private String directoryName = null;

/** ClassLoader for JDOEnhancer */
private ClassLoader loader = null;

/** Classpath (-cp) parameter */
private String classPath = null;

/** Check Only flag */
private boolean checkOnly = false;

/** Verbose flag */
private boolean verbose = false;

/** Recurse flag */
private boolean recurse = false;

/** Error messages should be empty unless there is an error */
private final StringBuilder errorBuffer = new StringBuilder();

/** Verbose messages are always collected but only output if verbose flag is set */
private final StringBuilder verboseBuffer = new StringBuilder();

/** File Names */
private List<String> fileNames = new ArrayList<>();

/** Class File Names */
private final List<String> classFileNames = new ArrayList<>();

/** JDO File Names */
private final List<String> jdoFileNames = new ArrayList<>();

/** Jar File Names */
private final List<String> jarFileNames = new ArrayList<>();

/** The number of classes validated by the JDOEnhancer */
private int numberOfValidatedClasses = 0;

/** The number of classes enhanced by the JDOEnhancer */
private int numberOfEnhancedClasses = 0;

Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/javax/jdo/spi/JDOImplHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ private static Locale getLocale(String s) {
String variant = s.substring(secondUnderbar + 1);
return new Locale(lang, country, variant);
}

/**
* Determine if a class is loadable in the current environment.
*
Expand Down Expand Up @@ -992,6 +993,7 @@ byte[] getFieldFlags() {
Class<?> getPersistenceCapableSuperclass() {
return persistenceCapableSuperclass;
}

/**
* This is an instance of <code>PersistenceCapable</code>, used at runtime to create new
* instances.
Expand Down
6 changes: 6 additions & 0 deletions exectck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@

<build>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<goalPrefix>exectck</goalPrefix>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
Expand Down
1 change: 1 addition & 0 deletions exectck/src/main/java/org/apache/jdo/exectck/Enhance.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class Enhance extends AbstractTCKMojo {
+ "inheritance"
+ File.separator
};

/** Location of TCK generated output. */
@Parameter(property = "jdo.tck.doEnhance", defaultValue = "true", required = true)
private boolean doEnhance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
public class InstallSchema extends AbstractTCKMojo {

private static final String DB_DIR_NAME = "database"; // NOI18N

/** List of mappings required by the current configuration */
protected Collection<String> mappings = new HashSet<>();

/** Location of TCK generated output. */
@Parameter(property = "jdo.tck.doInstallSchema", defaultValue = "true", required = true)
private boolean doInstallSchema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class Utilities {
private Utilities() {
// This method is deliberately left empty.
}

/*
* Return the current date/time as a String.
*/
Expand Down
90 changes: 33 additions & 57 deletions parent-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>26</version>
<version>33</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -166,6 +166,21 @@
<project.build.outputTimestamp>1661453031</project.build.outputTimestamp>
<showWarnings></showWarnings>
<compilerArgument></compilerArgument>
<maven.compiler.target>8</maven.compiler.target>

<version.maven-plugin-api>3.9.9</version.maven-plugin-api>
<version.javax.transaction-api>1.3</version.javax.transaction-api>
<version.junit-jupiter>5.11.3</version.junit-jupiter>
<version.junit-platform>1.11.3</version.junit-platform>
<version.javax.persistence>2.2.1</version.javax.persistence>
<version.derby>10.14.2.0</version.derby>
<version.commons-io>2.17.0</version.commons-io>
<version.spring-beans>5.3.39</version.spring-beans>
<version.commons-logging>1.2</version.commons-logging>
<version.glassfish-corba-omgapi>4.2.5</version.glassfish-corba-omgapi>
<version.maven-changes-plugin>2.12.1</version.maven-changes-plugin>
<version.maven-bundle-plugin>5.1.9</version.maven-bundle-plugin>
<version.fmt-maven-plugin>2.25</version.fmt-maven-plugin>
</properties>

<dependencyManagement>
Expand All @@ -188,79 +203,74 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.8.5</version>
<version>${version.maven-plugin-api}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.3</version>
<version>${version.javax.transaction-api}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.0</version>
<version>${version.junit-jupiter}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.10.0</version>
<version>${version.junit-jupiter}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>1.10.0</version>
<version>${version.junit-platform}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.10.0</version>
<version>${version.junit-platform}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-console</artifactId>
<version>1.10.0</version>
<version>${version.junit-platform}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.2.1</version>
<version>${version.javax.persistence}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.14.2.0</version>
<version>${version.derby}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<version>10.14.2.0</version>
<version>${version.derby}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.14.0</version>
<version>${version.commons-io}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.3.20</version>
<version>${version.spring-beans}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.4</version>
<version>${version.commons-logging}</version>
</dependency>
<dependency>
<!-- License: EDL 1.0 https://www.eclipse.org/org/documents/edl-v10.php -->
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<version>4.2.4</version>
<version>${version.glassfish-corba-omgapi}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -269,54 +279,20 @@

<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<version>${version.maven-changes-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.6</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>org.apache.rat</artifactId>
<version>0.14</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<version>${version.maven-bundle-plugin}</version>
</plugin>
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.19</version>
<version>${version.fmt-maven-plugin}</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class FetchGroupTest extends JDO_Test {
new String[] {
"hiredate", "weeklyhours", "personid", "firstname", "lastname", "middlename", "birthdate"
};

/** In org/apache/jdo/tck/pc/package.jdo, middlename is not in DFG */
protected final String[] defaultMembers =
new String[] {"hiredate", "weeklyhours", "personid", "firstname", "lastname", "birthdate"};
Expand Down Expand Up @@ -96,6 +97,7 @@ public class FetchGroupTest extends JDO_Test {
"phoneNumbers",
"languages"
};

/** Address address is of type Address and is a relationship */
protected final String[] relationshipMembers =
new String[] {
Expand All @@ -113,6 +115,7 @@ public class FetchGroupTest extends JDO_Test {
"hradvisees",
"address"
};

/** Map phoneNumbers and set languages are not relationships but are multivalued */
protected final String[] multivaluedMembers =
new String[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ protected Object detachClosure(Object pc) {
byte[] cartStream = serialize(pc);
return deserialize(cartStream);
}

/** */
private byte[] serialize(Object root) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class AbstractFetchPlanTest extends JDO_Test {
protected final String[] lowerRightGroup = new String[] {"default", "PCRect.lowerRight"};
protected final String[] bothGroup =
new String[] {"default", "PCRect.upperLeft", "PCRect.lowerRight"};

/**
* @see org.apache.jdo.tck.JDO_Test#localSetUp()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private void setTransactionIsolationLevelByAPI(String level) {
closePMF();
return;
}

/** */
private void getPMFsetTransactionIsolationLevelFromProperties(String level) {
String property = Constants.PROPERTY_TRANSACTION_ISOLATION_LEVEL + "." + level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class JDOConfigListener extends JDO_Test {

/** Creates a new instance of JDOConfigListener */
public JDOConfigListener() {}

/** */
private static final String ASSERTION_FAILED = "Assertions 11.1-40 failed: ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class Jdoconfig extends JDO_Test {

/** Creates a new instance of Jdoconfig */
public Jdoconfig() {}

/** */
private static final String ASSERTION_FAILED = "Assertion A11.1.2-1 failed: ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ public class Persistence extends JDO_Test {

/** Creates a new instance of Jdoconfig */
public Persistence() {}

/** */
private static final String ASSERTION_FAILED = "Assertion A11.1.2-1 failed: ";

// Do not use superclass pmf, pm
private PersistenceManagerFactory pmf = null;
private PersistenceManager pm = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ public void testSetToNewFromMappedBySide() {
failOnError();
}
}

/** */
@Test
public void testDeleteFromMappedSide() {
Expand Down
Loading