findAll(Context context) throws SQLException;
diff --git a/dspace-api/src/main/java/org/dspace/core/Context.java b/dspace-api/src/main/java/org/dspace/core/Context.java
index e878367ec4..2181626250 100644
--- a/dspace-api/src/main/java/org/dspace/core/Context.java
+++ b/dspace-api/src/main/java/org/dspace/core/Context.java
@@ -46,8 +46,6 @@ import org.springframework.util.CollectionUtils;
* changes and free up the resources.
*
* The context object is also used as a cache for CM API objects.
- *
- * @version $Revision$
*/
public class Context implements AutoCloseable {
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(Context.class);
diff --git a/dspace-api/src/main/java/org/dspace/core/I18nUtil.java b/dspace-api/src/main/java/org/dspace/core/I18nUtil.java
index cd0609e29f..68db217f1e 100644
--- a/dspace-api/src/main/java/org/dspace/core/I18nUtil.java
+++ b/dspace-api/src/main/java/org/dspace/core/I18nUtil.java
@@ -217,12 +217,11 @@ public class I18nUtil {
*/
public static String getInputFormsFileName(Locale locale) {
/** Name of the form definition XML file */
- String fileName = "";
final String FORM_DEF_FILE = "submission-forms";
final String FILE_TYPE = ".xml";
String defsFilename = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("dspace.dir")
+ File.separator + "config" + File.separator + FORM_DEF_FILE;
- fileName = getFilename(locale, defsFilename, FILE_TYPE);
+ String fileName = getFilename(locale, defsFilename, FILE_TYPE);
return fileName;
}
@@ -286,14 +285,13 @@ public class I18nUtil {
*/
public static String getDefaultLicense(Context context) {
Locale locale = context.getCurrentLocale();
- String fileName = "";
/** Name of the default license */
final String DEF_LIC_FILE = "default";
final String FILE_TYPE = ".license";
String defsFilename = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("dspace.dir")
+ File.separator + "config" + File.separator + DEF_LIC_FILE;
- fileName = getFilename(locale, defsFilename, FILE_TYPE);
+ String fileName = getFilename(locale, defsFilename, FILE_TYPE);
return fileName;
}
@@ -316,8 +314,7 @@ public class I18nUtil {
// with Language, Country
String fileNameLC = null;
// with Language
- String fileNameL = null;
- fileNameL = fileName + "_" + locale.getLanguage();
+ String fileNameL = fileName + "_" + locale.getLanguage();
if (fileType == null) {
fileType = "";
@@ -372,12 +369,11 @@ public class I18nUtil {
* String - localized filename of an email template
*/
public static String getEmailFilename(Locale locale, String name) {
- String templateName = "";
String templateFile = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("dspace.dir")
+ File.separator + "config" + File.separator + "emails"
+ File.separator + name;
- templateName = getFilename(locale, templateFile, "");
+ String templateName = getFilename(locale, templateFile, "");
return templateName;
}
@@ -389,7 +385,7 @@ public class I18nUtil {
* @return array of locale results, possibly empty
*/
public static Locale[] parseLocales(String[] locales) {
- List resultList = new ArrayList();
+ List resultList = new ArrayList<>();
for (String ls : locales) {
Locale lc = makeLocale(ls);
if (lc != null) {
diff --git a/dspace-api/src/main/java/org/dspace/core/Utils.java b/dspace-api/src/main/java/org/dspace/core/Utils.java
index 18daa5a69e..8968c8950f 100644
--- a/dspace-api/src/main/java/org/dspace/core/Utils.java
+++ b/dspace-api/src/main/java/org/dspace/core/Utils.java
@@ -33,8 +33,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.coverity.security.Escape;
+import java.nio.charset.StandardCharsets;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StringSubstitutor;
+import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
@@ -43,13 +45,12 @@ import org.dspace.services.factory.DSpaceServicesFactory;
* Utility functions for DSpace.
*
* @author Peter Breton
- * @version $Revision$
*/
public final class Utils {
/**
* log4j logger
*/
- private static Logger log = org.apache.logging.log4j.LogManager.getLogger(Utils.class);
+ private static final Logger log = LogManager.getLogger(Utils.class);
private static final Pattern DURATION_PATTERN = Pattern
.compile("(\\d+)([smhdwy])");
@@ -68,12 +69,12 @@ public final class Utils {
private static int counter = 0;
- private static Random random = new Random();
+ private static final Random random = new Random();
- private static VMID vmid = new VMID();
+ private static final VMID vmid = new VMID();
// for parseISO8601Date
- private static SimpleDateFormat parseFmt[] = {
+ private static final SimpleDateFormat parseFmt[] = {
// first try at parsing, has milliseconds (note General time zone)
new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSSz"),
@@ -88,12 +89,14 @@ public final class Utils {
// for formatISO8601Date
// output canonical format (note RFC22 time zone, easier to hack)
- private static SimpleDateFormat outFmtSecond = new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ssZ");
+ private static final SimpleDateFormat outFmtSecond
+ = new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ssZ");
// output format with millsecond precision
- private static SimpleDateFormat outFmtMillisec = new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSSZ");
+ private static final SimpleDateFormat outFmtMillisec
+ = new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSSZ");
- private static Calendar outCal = GregorianCalendar.getInstance();
+ private static final Calendar outCal = GregorianCalendar.getInstance();
/**
* Private constructor
@@ -107,7 +110,7 @@ public final class Utils {
* @return MD5 checksum for the data in hex format.
*/
public static String getMD5(String data) {
- return getMD5(data.getBytes());
+ return getMD5(data.getBytes(StandardCharsets.UTF_8));
}
/**
@@ -150,7 +153,7 @@ public final class Utils {
return null;
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
// This is far from the most efficient way to do things...
for (int i = 0; i < data.length; i++) {
@@ -194,10 +197,14 @@ public final class Utils {
random.nextBytes(junk);
- String input = new StringBuffer().append(vmid).append(
- new java.util.Date()).append(Arrays.toString(junk)).append(counter++).toString();
+ String input = new StringBuilder()
+ .append(vmid)
+ .append(new java.util.Date())
+ .append(Arrays.toString(junk))
+ .append(counter++)
+ .toString();
- return getMD5Bytes(input.getBytes());
+ return getMD5Bytes(input.getBytes(StandardCharsets.UTF_8));
}
// The following two methods are taken from the Jakarta IOUtil class.
diff --git a/dspace-api/src/main/java/org/dspace/curate/AbstractCurationTask.java b/dspace-api/src/main/java/org/dspace/curate/AbstractCurationTask.java
index d5ec37d60b..fa16d27369 100644
--- a/dspace-api/src/main/java/org/dspace/curate/AbstractCurationTask.java
+++ b/dspace-api/src/main/java/org/dspace/curate/AbstractCurationTask.java
@@ -13,7 +13,6 @@ import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
@@ -39,8 +38,6 @@ public abstract class AbstractCurationTask implements CurationTask {
protected Curator curator = null;
// curator-assigned taskId
protected String taskId = null;
- // logger
- private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AbstractCurationTask.class);
protected CommunityService communityService;
protected ItemService itemService;
protected HandleService handleService;
diff --git a/dspace-api/src/main/java/org/dspace/curate/CitationPage.java b/dspace-api/src/main/java/org/dspace/curate/CitationPage.java
index 386bf0ba92..0f02d5b757 100644
--- a/dspace-api/src/main/java/org/dspace/curate/CitationPage.java
+++ b/dspace-api/src/main/java/org/dspace/curate/CitationPage.java
@@ -19,7 +19,6 @@ import org.apache.commons.lang3.tuple.Pair;
import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Bitstream;
-import org.dspace.content.BitstreamFormat;
import org.dspace.content.Bundle;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
@@ -46,7 +45,7 @@ public class CitationPage extends AbstractCurationTask {
/**
* Class Logger
*/
- private static Logger log = org.apache.logging.log4j.LogManager.getLogger(CitationPage.class);
+ private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(CitationPage.class);
protected int status = Curator.CURATE_UNSET;
protected String result = null;
@@ -97,7 +96,7 @@ public class CitationPage extends AbstractCurationTask {
//Determine if the DISPLAY bundle exits. If not, create it.
List dBundles = itemService.getBundles(item, CitationPage.DISPLAY_BUNDLE_NAME);
Bundle dBundle = null;
- if (dBundles == null || dBundles.size() == 0) {
+ if (dBundles == null || dBundles.isEmpty()) {
try {
dBundle = bundleService.create(Curator.curationContext(), item, CitationPage.DISPLAY_BUNDLE_NAME);
} catch (AuthorizeException e) {
@@ -110,7 +109,7 @@ public class CitationPage extends AbstractCurationTask {
//Create a map of the bitstreams in the displayBundle. This is used to
//check if the bundle being cited is already in the display bundle.
- Map displayMap = new HashMap();
+ Map displayMap = new HashMap<>();
for (Bitstream bs : dBundle.getBitstreams()) {
displayMap.put(bs.getName(), bs);
}
@@ -143,15 +142,16 @@ public class CitationPage extends AbstractCurationTask {
// Loop through each file and generate a cover page for documents
// that are PDFs.
for (Bitstream bitstream : bitstreams) {
- BitstreamFormat format = bitstream.getFormat(Curator.curationContext());
//If bitstream is a PDF document then it is citable.
CitationDocumentService citationDocument = DisseminateServiceFactory.getInstance()
.getCitationDocumentService();
if (citationDocument.canGenerateCitationVersion(Curator.curationContext(), bitstream)) {
- this.resBuilder.append(item.getHandle() + " - "
- + bitstream.getName() + " is citable.");
+ this.resBuilder.append(item.getHandle())
+ .append(" - ")
+ .append(bitstream.getName())
+ .append(" is citable.");
try {
//Create the cited document
Pair citedDocument =
@@ -168,7 +168,9 @@ public class CitationPage extends AbstractCurationTask {
StringBuilder stack = new StringBuilder();
int numLines = Math.min(stackTrace.length, 12);
for (int j = 0; j < numLines; j++) {
- stack.append("\t" + stackTrace[j].toString() + "\n");
+ stack.append("\t")
+ .append(stackTrace[j].toString())
+ .append("\n");
}
if (stackTrace.length > numLines) {
stack.append("\t. . .\n");
@@ -180,8 +182,10 @@ public class CitationPage extends AbstractCurationTask {
}
} else {
//bitstream is not a document
- this.resBuilder.append(item.getHandle() + " - "
- + bitstream.getName() + " is not citable.\n");
+ this.resBuilder.append(item.getHandle())
+ .append(" - ")
+ .append(bitstream.getName())
+ .append(" is not citable.\n");
this.status = Curator.CURATE_SUCCESS;
}
}
@@ -211,11 +215,11 @@ public class CitationPage extends AbstractCurationTask {
//If we are modifying a file that is not in the
//preservation bundle then we have to move it there.
Context context = Curator.curationContext();
- if (bundle.getID() != pBundle.getID()) {
+ if (!bundle.getID().equals(pBundle.getID())) {
bundleService.addBitstream(context, pBundle, bitstream);
bundleService.removeBitstream(context, bundle, bitstream);
List bitstreams = bundle.getBitstreams();
- if (bitstreams == null || bitstreams.size() == 0) {
+ if (bitstreams == null || bitstreams.isEmpty()) {
itemService.removeBundle(context, item, bundle);
}
}
@@ -235,9 +239,11 @@ public class CitationPage extends AbstractCurationTask {
bitstreamService.setFormat(context, citedBitstream, bitstream.getFormat(Curator.curationContext()));
citedBitstream.setDescription(context, bitstream.getDescription());
- this.resBuilder.append(" Added "
- + citedBitstream.getName()
- + " to the " + CitationPage.DISPLAY_BUNDLE_NAME + " bundle.\n");
+ this.resBuilder.append(" Added ")
+ .append(citedBitstream.getName())
+ .append(" to the ")
+ .append(CitationPage.DISPLAY_BUNDLE_NAME)
+ .append(" bundle.\n");
//Run update to propagate changes to the
//database.
diff --git a/dspace-api/src/main/java/org/dspace/curate/TaskResolver.java b/dspace-api/src/main/java/org/dspace/curate/TaskResolver.java
index a9a8e8906a..2b12745d8f 100644
--- a/dspace-api/src/main/java/org/dspace/curate/TaskResolver.java
+++ b/dspace-api/src/main/java/org/dspace/curate/TaskResolver.java
@@ -15,11 +15,13 @@ import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
+import java.nio.charset.StandardCharsets;
import java.util.Properties;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
+import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.core.factory.CoreServiceFactory;
import org.dspace.services.factory.DSpaceServicesFactory;
@@ -64,7 +66,7 @@ import org.dspace.services.factory.DSpaceServicesFactory;
public class TaskResolver {
// logging service
- private static Logger log = org.apache.logging.log4j.LogManager.getLogger(TaskResolver.class);
+ private static final Logger log = LogManager.getLogger(TaskResolver.class);
// base directory of task scripts & catalog name
protected static final String CATALOG = "task.catalog";
@@ -94,7 +96,7 @@ public class TaskResolver {
if (script.exists()) {
BufferedReader reader = null;
try {
- reader = new BufferedReader(new FileReader(script));
+ reader = new BufferedReader(new FileReader(script, StandardCharsets.UTF_8));
String line = null;
while ((line = reader.readLine()) != null) {
if (line.startsWith("#") && line.indexOf("$td=") > 0) {
@@ -136,7 +138,7 @@ public class TaskResolver {
catalog.put(taskName, descriptor);
Writer writer = null;
try {
- writer = new FileWriter(new File(scriptDir, CATALOG));
+ writer = new FileWriter(new File(scriptDir, CATALOG), StandardCharsets.UTF_8);
catalog.store(writer, "do not edit");
} catch (IOException ioE) {
log.error("Error saving scripted task catalog: " + CATALOG);
@@ -179,7 +181,7 @@ public class TaskResolver {
File script = new File(scriptDir, tokens[1]);
if (script.exists()) {
try {
- Reader reader = new FileReader(script);
+ Reader reader = new FileReader(script, StandardCharsets.UTF_8);
engine.eval(reader);
reader.close();
// third token is the constructor expression for the class
@@ -212,7 +214,7 @@ public class TaskResolver {
File catalogFile = new File(scriptDir, CATALOG);
if (catalogFile.exists()) {
try {
- Reader reader = new FileReader(catalogFile);
+ Reader reader = new FileReader(catalogFile, StandardCharsets.UTF_8);
catalog.load(reader);
reader.close();
} catch (IOException ioE) {
diff --git a/dspace-api/src/main/java/org/dspace/discovery/FullTextContentStreams.java b/dspace-api/src/main/java/org/dspace/discovery/FullTextContentStreams.java
index 97187c79ed..b3ee42fca1 100644
--- a/dspace-api/src/main/java/org/dspace/discovery/FullTextContentStreams.java
+++ b/dspace-api/src/main/java/org/dspace/discovery/FullTextContentStreams.java
@@ -16,9 +16,9 @@ import java.io.Reader;
import java.io.SequenceInputStream;
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
+import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import javax.annotation.Nullable;
@@ -55,7 +55,7 @@ public class FullTextContentStreams extends ContentStreamBase {
}
protected void init(Item parentItem) {
- fullTextStreams = new LinkedList<>();
+ fullTextStreams = new ArrayList<>();
if (parentItem != null) {
sourceInfo = parentItem.getHandle();
@@ -149,8 +149,8 @@ public class FullTextContentStreams extends ContentStreamBase {
}
private class FullTextBitstream {
- private String itemHandle;
- private Bitstream bitstream;
+ private final String itemHandle;
+ private final Bitstream bitstream;
public FullTextBitstream(final String parentHandle, final Bitstream file) {
this.itemHandle = parentHandle;
@@ -179,18 +179,20 @@ public class FullTextContentStreams extends ContentStreamBase {
}
}
- private class FullTextEnumeration implements Enumeration {
+ private static class FullTextEnumeration implements Enumeration {
private final Iterator fulltextIterator;
- public FullTextEnumeration(final Iterator fulltextStreams) {
- this.fulltextIterator = fulltextStreams;
+ public FullTextEnumeration(final Iterator fulltextIterator) {
+ this.fulltextIterator = fulltextIterator;
}
+ @Override
public boolean hasMoreElements() {
return fulltextIterator.hasNext();
}
+ @Override
public InputStream nextElement() {
InputStream inputStream = null;
FullTextBitstream bitstream = null;
diff --git a/dspace-api/src/main/java/org/dspace/event/ConsumerProfile.java b/dspace-api/src/main/java/org/dspace/event/ConsumerProfile.java
index c66c331332..d1059f8e2f 100644
--- a/dspace-api/src/main/java/org/dspace/event/ConsumerProfile.java
+++ b/dspace-api/src/main/java/org/dspace/event/ConsumerProfile.java
@@ -104,7 +104,9 @@ public class ConsumerProfile {
"No filters configured for consumer named: " + name);
}
- consumer = (Consumer) Class.forName(className.trim()).getDeclaredConstructor().newInstance();
+ consumer = Class.forName(className.trim())
+ .asSubclass(Consumer.class)
+ .getDeclaredConstructor().newInstance();
// Each "filter" is + : ...
filters = new ArrayList<>();
diff --git a/dspace-api/src/main/java/org/dspace/event/Event.java b/dspace-api/src/main/java/org/dspace/event/Event.java
index 45b6407b28..af8b2d4571 100644
--- a/dspace-api/src/main/java/org/dspace/event/Event.java
+++ b/dspace-api/src/main/java/org/dspace/event/Event.java
@@ -48,8 +48,6 @@ import org.dspace.event.factory.EventServiceFactory;
* significance varies by the combination of action and subject type.
* - timestamp -- exact millisecond timestamp at which event was logged.
*
- *
- * @version $Revision$
*/
public class Event implements Serializable {
private static final long serialVersionUID = 1L;
@@ -308,6 +306,7 @@ public class Event implements Serializable {
* @param other the event to compare this one to
* @return true if events are "equal", false otherwise.
*/
+ @Override
public boolean equals(Object other) {
if (other instanceof Event) {
Event otherEvent = (Event) other;
@@ -315,14 +314,15 @@ public class Event implements Serializable {
.equals(otherEvent.detail))
&& this.eventType == otherEvent.eventType
&& this.subjectType == otherEvent.subjectType
- && this.subjectID == otherEvent.subjectID
+ && this.subjectID.equals(otherEvent.subjectID)
&& this.objectType == otherEvent.objectType
- && this.objectID == otherEvent.objectID;
+ && this.objectID.equals(otherEvent.objectID);
}
return false;
}
+ @Override
public int hashCode() {
return new HashCodeBuilder().append(this.detail)
.append(eventType)
@@ -634,6 +634,7 @@ public class Event implements Serializable {
* @return Detailed string representation of contents of this event, to
* help in logging and debugging.
*/
+ @Override
public String toString() {
return "org.dspace.event.Event(eventType="
+ this.getEventTypeAsString()
diff --git a/dspace-api/src/main/java/org/dspace/handle/Handle.java b/dspace-api/src/main/java/org/dspace/handle/Handle.java
index 76fed105b9..c35511353a 100644
--- a/dspace-api/src/main/java/org/dspace/handle/Handle.java
+++ b/dspace-api/src/main/java/org/dspace/handle/Handle.java
@@ -105,7 +105,7 @@ public class Handle implements ReloadableEntity {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!(o instanceof Handle)) {
return false;
}
diff --git a/dspace-api/src/main/java/org/dspace/text/filter/InitialArticleWord.java b/dspace-api/src/main/java/org/dspace/text/filter/InitialArticleWord.java
index 700b25748e..167b201e0f 100644
--- a/dspace-api/src/main/java/org/dspace/text/filter/InitialArticleWord.java
+++ b/dspace-api/src/main/java/org/dspace/text/filter/InitialArticleWord.java
@@ -110,7 +110,7 @@ public abstract class InitialArticleWord implements TextFilter {
return str.substring(cutPos);
} else {
// No - move the initial article word to the end
- return new StringBuffer(str.substring(cutPos))
+ return new StringBuilder(str.substring(cutPos))
.append(wordSeparator)
.append(str.substring(initialStart, initialEnd))
.toString();
@@ -124,10 +124,12 @@ public abstract class InitialArticleWord implements TextFilter {
}
protected InitialArticleWord(boolean stripWord) {
+ this.wordSeparator = ", ";
stripInitialArticle = stripWord;
}
protected InitialArticleWord() {
+ this.wordSeparator = ", ";
stripInitialArticle = false;
}
@@ -138,9 +140,8 @@ public abstract class InitialArticleWord implements TextFilter {
* @return An array of definite/indefinite article words
*/
protected abstract String[] getArticleWords(String lang);
-
// Separator to use when appending article to end
- private String wordSeparator = ", ";
+ private final String wordSeparator;
// Flag to signify initial article word should be removed
// If false, then the initial article word is appended to the end
diff --git a/dspace-api/src/main/java/org/dspace/xmlworkflow/storedcomponents/InProgressUser.java b/dspace-api/src/main/java/org/dspace/xmlworkflow/storedcomponents/InProgressUser.java
index 5cd714345e..efbd26bde5 100644
--- a/dspace-api/src/main/java/org/dspace/xmlworkflow/storedcomponents/InProgressUser.java
+++ b/dspace-api/src/main/java/org/dspace/xmlworkflow/storedcomponents/InProgressUser.java
@@ -59,6 +59,7 @@ public class InProgressUser implements ReloadableEntity {
}
+ @Override
public Integer getID() {
return id;
}
diff --git a/dspace-api/src/test/java/org/dspace/content/MetadataFieldNameTest.java b/dspace-api/src/test/java/org/dspace/content/MetadataFieldNameTest.java
index f0ca7d25d8..a3a069b35e 100644
--- a/dspace-api/src/test/java/org/dspace/content/MetadataFieldNameTest.java
+++ b/dspace-api/src/test/java/org/dspace/content/MetadataFieldNameTest.java
@@ -26,17 +26,17 @@ public class MetadataFieldNameTest {
@Test
public void testConstruct3() {
MetadataFieldName instance = new MetadataFieldName("one", "two", "three");
- assertEquals("Incorrect schema", "one", instance.SCHEMA);
- assertEquals("Incorrect element", "two", instance.ELEMENT);
- assertEquals("Incorrect qualifier", "three", instance.QUALIFIER);
+ assertEquals("Incorrect schema", "one", instance.schema);
+ assertEquals("Incorrect element", "two", instance.element);
+ assertEquals("Incorrect qualifier", "three", instance.qualifier);
}
@Test
public void testConstruct2() {
MetadataFieldName instance = new MetadataFieldName("one", "two");
- assertEquals("Incorrect schema", "one", instance.SCHEMA);
- assertEquals("Incorrect element", "two", instance.ELEMENT);
- assertNull("Incorrect qualifier", instance.QUALIFIER);
+ assertEquals("Incorrect schema", "one", instance.schema);
+ assertEquals("Incorrect element", "two", instance.element);
+ assertNull("Incorrect qualifier", instance.qualifier);
}
@Test(expected = NullPointerException.class)