← Back to team overview

slub.team team mailing list archive

[Merge] lp:~zeutschel/goobi-production/various-warnings into lp:goobi-production

 

Matthias Ronge has proposed merging lp:~zeutschel/goobi-production/various-warnings into lp:goobi-production.

Requested reviews:
  Saxon State Library Team (slub.team)

For more details, see:
https://code.launchpad.net/~zeutschel/goobi-production/various-warnings/+merge/113219

This fixes some coding issues such as unused imports and variables and a bunch of @SuppressWarnings("unchecked") constructs placed where no warnings will ever be thrown. It should not have any impact on functionality.
-- 
https://code.launchpad.net/~zeutschel/goobi-production/various-warnings/+merge/113219
Your team Saxon State Library Team is requested to review the proposed merge of lp:~zeutschel/goobi-production/various-warnings into lp:goobi-production.
=== modified file 'src-dubious/dubious/sub/goobi/helper/Page.java'
--- src-dubious/dubious/sub/goobi/helper/Page.java	2012-03-10 13:34:49 +0000
+++ src-dubious/dubious/sub/goobi/helper/Page.java	2012-07-03 14:18:34 +0000
@@ -23,7 +23,6 @@
  * @author Gavin King
  * @author Eric Broyles
  */
-@SuppressWarnings("unchecked")
 public class Page implements Serializable {
 	private static final long serialVersionUID = -290320409344472392L;
 	//TODO: Use generics

=== modified file 'src/de/sub/goobi/beans/Benutzer.java'
--- src/de/sub/goobi/beans/Benutzer.java	2012-04-24 12:00:57 +0000
+++ src/de/sub/goobi/beans/Benutzer.java	2012-07-03 14:18:34 +0000
@@ -32,9 +32,8 @@
 
 import de.sub.goobi.config.ConfigMain;
 import de.sub.goobi.helper.FilesystemHelper;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.ldap.Ldap;
 import dubious.sub.goobi.helper.encryption.DesEncrypter;
-import de.sub.goobi.helper.ldap.Ldap;
 
 public class Benutzer implements Serializable {
 	private static final long serialVersionUID = -7482853955996650586L;

=== modified file 'src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java'
--- src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java	2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java	2012-07-03 14:18:34 +0000
@@ -96,7 +96,6 @@
 	 * @throws MetadataTypeNotAllowedException
 	 * @throws DocStructHasNoTypeException
 	 */
-	@SuppressWarnings("unchecked")
 	private void RusdmlDocStructPagesAuswerten(DocStruct inStruct) throws DocStructHasNoTypeException, MetadataTypeNotAllowedException {
 
 		RusdmlDropMetadata(inStruct);

=== modified file 'src/de/sub/goobi/forms/HelperForm.java'
--- src/de/sub/goobi/forms/HelperForm.java	2012-04-24 13:22:01 +0000
+++ src/de/sub/goobi/forms/HelperForm.java	2012-07-03 14:18:34 +0000
@@ -145,7 +145,7 @@
 		// TODO: Avoid SQL here
 		List<Regelsatz> temp = new RegelsatzDAO().search("from Regelsatz ORDER BY titel");
 		for (Iterator<Regelsatz> iter = temp.iterator(); iter.hasNext();) {
-			Regelsatz an = (Regelsatz) iter.next();
+			Regelsatz an = iter.next();
 			myPrefs.add(new SelectItem(an, an.getTitel(), null));
 		}
 		return myPrefs;
@@ -189,19 +189,8 @@
 		return reqUrl;
 	}
 
-	// TODO: Try to avoid Iterators, usr for loops instead
-	@SuppressWarnings( { "unchecked", "unused" })
 	public boolean getMessagesExist() {
-		boolean rueck = false;
-		FacesContext context = FacesContext.getCurrentInstance();
-		for (Iterator it = context.getClientIdsWithMessages(); it.hasNext();) {
-			Object o = it.next();
-		}
-		for (Iterator it = context.getMessages(); it.hasNext();) {
-			FacesMessage o = (FacesMessage) it.next();
-			rueck = true;
-		}
-		return rueck;
+		return FacesContext.getCurrentInstance().getMessages().hasNext();
 	}
 
 	public List<SelectItem> getCssFiles() {

=== modified file 'src/de/sub/goobi/forms/ProjekteForm.java'
--- src/de/sub/goobi/forms/ProjekteForm.java	2012-03-10 13:33:00 +0000
+++ src/de/sub/goobi/forms/ProjekteForm.java	2012-07-03 14:18:34 +0000
@@ -339,7 +339,6 @@
 	 * generates values for count of volumes and images for statistics
 	 */
 
-	@SuppressWarnings("unchecked")
 	public void GenerateValuesForStatistics() {
 		Criteria crit = Helper.getHibernateSession().createCriteria(Prozess.class).add(Restrictions.eq("projekt", myProjekt));
 		ProjectionList pl = Projections.projectionList();

=== modified file 'src/de/sub/goobi/forms/SessionForm.java'
--- src/de/sub/goobi/forms/SessionForm.java	2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/forms/SessionForm.java	2012-07-03 14:18:34 +0000
@@ -44,8 +44,7 @@
 public class SessionForm {
 
    private int sessionZeit = 3600 * 2; // 2 Stunden
-   @SuppressWarnings("unchecked")
-private List alleSessions = new ArrayList();
+   private List alleSessions = new ArrayList();
    private SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
    private String aktuelleZeit = formatter.format(new Date());
    private String bitteAusloggen = "";
@@ -67,7 +66,6 @@
 
    
 
-	@SuppressWarnings("unchecked")
 	public List getAlleSessions() {
 		try {
 			return alleSessions;
@@ -183,8 +181,7 @@
    
 
    /* prüfen, ob der Benutzer in einer anderen Session aktiv ist */
-   @SuppressWarnings("unchecked")
-public boolean BenutzerInAndererSessionAktiv(HttpSession insession, Benutzer inBenutzer) {
+   public boolean BenutzerInAndererSessionAktiv(HttpSession insession, Benutzer inBenutzer) {
       boolean rueckgabe = false;
       //TODO: Don't use Iterators
       for (Iterator iter = alleSessions.iterator(); iter.hasNext();) {

=== modified file 'src/de/sub/goobi/helper/Helper.java'
--- src/de/sub/goobi/helper/Helper.java	2012-05-30 08:24:19 +0000
+++ src/de/sub/goobi/helper/Helper.java	2012-07-03 14:18:34 +0000
@@ -65,7 +65,6 @@
 	 * 
 	 * @return Paramter als String
 	 */
-	@SuppressWarnings("unchecked")
 	public static String getRequestParameter(String Parameter) {
 		/* einen bestimmten übergebenen Parameter ermitteln */
 		FacesContext context = FacesContext.getCurrentInstance();

=== modified file 'src/de/sub/goobi/helper/PaginatingCriteria.java'
--- src/de/sub/goobi/helper/PaginatingCriteria.java	2011-12-20 08:07:09 +0000
+++ src/de/sub/goobi/helper/PaginatingCriteria.java	2012-07-03 14:18:34 +0000
@@ -76,7 +76,6 @@
 	 * @param clazz
 	 * @param session
 	 */
-	@SuppressWarnings("unchecked")
 	public PaginatingCriteria(Class clazz, Session session) {
 		criteria = session.createCriteria(clazz);
 		clone = session.createCriteria(clazz);
@@ -344,7 +343,6 @@
 	 * @return List
 	 * @see Criteria#list()
 	 */
-	@SuppressWarnings("unchecked")
 	public List list() throws HibernateException {
 		return criteria.list();
 	}

=== modified file 'src/de/sub/goobi/helper/WebDav.java'
--- src/de/sub/goobi/helper/WebDav.java	2012-04-24 12:00:57 +0000
+++ src/de/sub/goobi/helper/WebDav.java	2012-07-03 14:18:34 +0000
@@ -23,18 +23,21 @@
 package de.sub.goobi.helper;
 
 //TODO: Replace with a VFS
-import java.io.*;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.OutputStreamWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.log4j.Logger;
 
 import de.sub.goobi.beans.Benutzer;
 import de.sub.goobi.beans.Prozess;
+import de.sub.goobi.config.ConfigMain;
 import de.sub.goobi.export.download.TiffHeader;
-import de.sub.goobi.config.ConfigMain;
 
 public class WebDav {
 	private static final Logger myLogger = Logger.getLogger(WebDav.class);
@@ -135,7 +138,6 @@
 	}
 
 	public void DownloadToHome(Prozess myProzess, int inSchrittID, boolean inNurLesen) {
-		Helper help = new Helper();
 		saveTiffHeader(myProzess);
 		Benutzer aktuellerBenutzer = (Benutzer) Helper.getManagedBeanValue("#{LoginForm.myBenutzer}");
 		String von = "";

=== modified file 'src/de/sub/goobi/helper/ldap/Ldap.java'
--- src/de/sub/goobi/helper/ldap/Ldap.java	2012-04-24 12:00:57 +0000
+++ src/de/sub/goobi/helper/ldap/Ldap.java	2012-07-03 14:18:34 +0000
@@ -46,14 +46,13 @@
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchResult;
 
-import dubious.sub.goobi.helper.encryption.MD4;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
 
 import de.sub.goobi.beans.Benutzer;
 import de.sub.goobi.config.ConfigMain;
 import de.sub.goobi.helper.FilesystemHelper;
-import de.sub.goobi.helper.Helper;
+import dubious.sub.goobi.helper.encryption.MD4;
 
 public class Ldap {
 	private static final Logger myLogger = Logger.getLogger(Ldap.class);

=== modified file 'src/de/sub/goobi/metadaten/Metadaten.java'
--- src/de/sub/goobi/metadaten/Metadaten.java	2012-05-09 16:53:48 +0000
+++ src/de/sub/goobi/metadaten/Metadaten.java	2012-07-03 14:18:34 +0000
@@ -227,11 +227,10 @@
 		if (!SperrungAktualisieren()) {
 			return "SperrungAbgelaufen";
 		} else {
-			boolean successfulStore;
 			calculateMetadataAndImages();
 			cleanupMetadata();
 			// ignoring result of store operation
-			successfulStore = storeMetadata();
+			storeMetadata();
 			return "";
 		}
 	}
@@ -733,7 +732,6 @@
 	 * ##################################################### ####################################################
 	 */
 
-	@SuppressWarnings("unchecked")
 	private String MetadatenalsTree3Einlesen1() {
 		HashMap map;
 		TreeNodeStruct3 knoten;
@@ -803,7 +801,6 @@
 		if (inStrukturelement.getType().getName().equals("Periodical") || inStrukturelement.getType().getName().equals("PeriodicalVolume"))
 			OberKnoten.setExpanded(true);
 
-		int zaehler = 0;
 		/*
 		 * -------------------------------- vom aktuellen Strukturelement alle Kinder in den Tree packen --------------------------------
 		 */
@@ -815,7 +812,6 @@
 				if (label == null)
 					label = kind.getType().getName();
 				TreeNodeStruct3 tns = new TreeNodeStruct3(label, kind);
-				zaehler++;
 				OberKnoten.addChild(tns);
 				MetadatenalsTree3Einlesen2(kind, tns);
 			}
@@ -840,7 +836,6 @@
 		return rueckgabe.trim();
 	}
 
-	@SuppressWarnings("unchecked")
 	public void setMyStrukturelement(DocStruct inStruct) {
 		modusHinzufuegen = false;
 		modusHinzufuegenPerson = false;
@@ -1824,7 +1819,6 @@
 	/**
 	 * die erste und die letzte Seite festlegen und alle dazwischen zuweisen ================================================================
 	 */
-	@SuppressWarnings("unchecked")
 	public String SeitenVonChildrenUebernehmen() {
 		if (!SperrungAktualisieren())
 			return "SperrungAbgelaufen";
@@ -2285,7 +2279,6 @@
 			TreeDurchlaufen(tree3);
 	}
 
-	@SuppressWarnings("unchecked")
 	private void TreeDurchlaufen(TreeNodeStruct3 inTreeStruct) {
 		DocStruct temp = inTreeStruct.getStruct();
 		if (inTreeStruct.getStruct() == myDocStruct)

=== modified file 'src/de/sub/goobi/modul/ExtendedDataImpl.java'
--- src/de/sub/goobi/modul/ExtendedDataImpl.java	2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/modul/ExtendedDataImpl.java	2012-07-03 14:18:34 +0000
@@ -75,9 +75,7 @@
     * @return Status (Fehler)
     * @throws GoobiException: 1, 2, 6, 7, 254, 1500, 1501, 1502
     * ================================================================*/
-   //TODO: Use generics
-   @SuppressWarnings("unchecked")
-public int add(String sessionId, String type, int count, HashMap pp) throws GoobiException {
+   public int add(String sessionId, String type, int count, HashMap pp) throws GoobiException {
       super.add(sessionId, type, count, pp);
       Prozess p = ModuleServerForm.getProcessFromShortSession(sessionId);
       GoobiProcessProperty gpp = new GoobiProcessProperty(pp);
@@ -252,9 +250,7 @@
     * @return Status (Fehler)
     * @throws GoobiException: 1, 2, 6, 7, 254, 1501, 1502
     * ================================================================*/
-   //TODO: Use generics
-   @SuppressWarnings("unchecked")
-public int set(String sessionId, String type, int count, HashMap pp) throws GoobiException {
+   public int set(String sessionId, String type, int count, HashMap pp) throws GoobiException {
       super.set(sessionId, type, count, pp);
       Prozess p = ModuleServerForm.getProcessFromShortSession(sessionId);
       GoobiProcessProperty gpp = new GoobiProcessProperty(pp);

=== modified file 'src/de/sub/goobi/persistence/BaseDAO.java'
--- src/de/sub/goobi/persistence/BaseDAO.java	2012-03-28 13:06:13 +0000
+++ src/de/sub/goobi/persistence/BaseDAO.java	2012-07-03 14:18:34 +0000
@@ -15,16 +15,16 @@
  */
 package de.sub.goobi.persistence;
 
-import de.sub.goobi.helper.Helper;
-import de.sub.goobi.helper.Util;
-import de.sub.goobi.helper.exceptions.DAOException;
+import java.io.Serializable;
+import java.sql.SQLException;
+import java.util.List;
+
 import org.hibernate.HibernateException;
 import org.hibernate.Query;
 import org.hibernate.Session;
 
-import java.io.Serializable;
-import java.sql.SQLException;
-import java.util.List;
+import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.exceptions.DAOException;
 
 /**
  * Base class for DAOs. This class defines common CRUD methods.

=== modified file 'src/org/goobi/io/BackupFileRotation.java'
--- src/org/goobi/io/BackupFileRotation.java	2012-05-10 13:57:31 +0000
+++ src/org/goobi/io/BackupFileRotation.java	2012-07-03 14:18:34 +0000
@@ -22,14 +22,14 @@
 
 package org.goobi.io;
 
-import de.sub.goobi.helper.FilesystemHelper;
-import org.apache.log4j.Logger;
-
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.FilenameFilter;
 import java.io.IOException;
 
+import org.apache.log4j.Logger;
+
+import de.sub.goobi.helper.FilesystemHelper;
+
 /**
  * Creates backup for files in a given directory that match a regular expression.
  *

=== modified file 'src/org/goobi/production/chart/HibernateProjectTaskList.java'
--- src/org/goobi/production/chart/HibernateProjectTaskList.java	2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/chart/HibernateProjectTaskList.java	2012-07-03 14:18:34 +0000
@@ -55,9 +55,7 @@
 
 		ScrollableResults list = crit.setCacheMode(CacheMode.IGNORE).scroll(ScrollMode.FORWARD_ONLY);
 
-		int count = 0;
 		while (list.next()) {
-			count++;
 			Schritt step = (Schritt) list.get(0);
 			String shorttitle = (step.getTitel().length() > 60 ? step.getTitel().substring(0, 60) + "..." : step.getTitel());
 

=== modified file 'src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java'
--- src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java	2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java	2012-07-03 14:18:34 +0000
@@ -57,7 +57,6 @@
 		return myTaskList;
 	}
 
-	@SuppressWarnings("unchecked")
 	private synchronized void calculate(Projekt inProject, List<IProjectTask> myTaskList, Boolean countImages, Integer inMax) {
 
 		Session session = Helper.getHibernateSession();

=== modified file 'src/org/goobi/production/cli/helper/CopyProcess.java'
--- src/org/goobi/production/cli/helper/CopyProcess.java	2012-02-22 11:26:21 +0000
+++ src/org/goobi/production/cli/helper/CopyProcess.java	2012-07-03 14:18:34 +0000
@@ -844,7 +844,6 @@
 		return possibleDigitalCollection;
 	}
 
-	@SuppressWarnings("unchecked")
 	private void initializePossibleDigitalCollections() {
 		possibleDigitalCollection = new ArrayList<String>();
 		String filename = new Helper().getGoobiConfigDirectory() + "digitalCollections.xml";
@@ -992,7 +991,6 @@
 	/**
 	 * Prozesstitel und andere Details generieren ================================================================
 	 */
-	@SuppressWarnings("unchecked")
 	public void CalcProzesstitel() {
 		String newTitle = "";
 		String titeldefinition = "";
@@ -1102,7 +1100,6 @@
 
 	/* =============================================================== */
 
-	@SuppressWarnings("unchecked")
 	public void CalcTiffheader() {
 		String tif_definition = "";
 		ConfigProjects cp = null;

=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java	2012-04-24 13:22:01 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java	2012-07-03 14:18:34 +0000
@@ -77,7 +77,6 @@
 	 * (non-Javadoc)
 	 * @see org.goobi.production.flow.statistics.IStatisticalQuestion#getDataTables(org.goobi.production.flow.statistics.IDataSource)
 	 */
-	@SuppressWarnings("unchecked")
 	public List<DataTable> getDataTables(IDataSource dataSource) {
 
 		List<DataTable> allTables = new ArrayList<DataTable>();

=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java	2012-04-24 13:22:01 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java	2012-07-03 14:18:34 +0000
@@ -70,7 +70,6 @@
 	 * 
 	 * @see org.goobi.production.flow.statistics.IStatisticalQuestion#getDataTables(org.goobi.production.flow.statistics.IDataSource)
 	 ****************************************************************************/
-	@SuppressWarnings("unchecked")
 	public List<DataTable> getDataTables(IDataSource dataSource) {
 
 		// contains an intger representing "reihenfolge" in schritte, as defined for this request

=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java	2012-04-24 13:22:01 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java	2012-07-03 14:18:34 +0000
@@ -320,7 +320,6 @@
 	 * 				read in first in order to get a certain sorting 
 	 * @return DataTable
 	 */
-	@SuppressWarnings("unchecked")
 	private DataTable buildDataTableFromSQL(String natSQL) {
 		Session session = Helper.getHibernateSession();
 

=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java	2012-04-24 13:22:01 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java	2012-07-03 14:18:34 +0000
@@ -67,7 +67,6 @@
 	 * (non-Javadoc)
 	 * @see org.goobi.production.flow.statistics.IStatisticalQuestion#getDataTables(org.goobi.production.flow.statistics.IDataSource)
 	 */
-	@SuppressWarnings("unchecked")
 	public List<DataTable> getDataTables(IDataSource dataSource) {
 
 		List<DataTable> allTables = new ArrayList<DataTable>();

=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java	2012-04-24 13:22:01 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java	2012-07-03 14:18:34 +0000
@@ -320,7 +320,7 @@
 	 * 				read in first in order to get a certain sorting 
 	 * @return DataTable
 	 */
-	@SuppressWarnings("unchecked")
+	
 	//TODO Remove redundant code
 	private DataTable buildDataTableFromSQL(String natSQL, String headerFromSQL) {
 		Session session = Helper.getHibernateSession();
@@ -431,7 +431,6 @@
 	 * 
 	 * @param requestedType
 	 */
-	@SuppressWarnings("unchecked")
 	private Integer getMaxStepCount(HistoryEventType requestedType) {
 
 		// adding time restrictions
@@ -459,7 +458,6 @@
 	 * 
 	 * @param requestedType
 	 */
-	@SuppressWarnings("unchecked")
 	private Integer getMinStepCount(HistoryEventType requestedType) {
 
 		// adding time restrictions

=== modified file 'src/org/goobi/production/importer/FireburnDataImport.java'
--- src/org/goobi/production/importer/FireburnDataImport.java	2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/importer/FireburnDataImport.java	2012-07-03 14:18:34 +0000
@@ -454,7 +454,6 @@
 	 * @throws JDOMException
 	 * @throws ParseException
 	 *****************************************************************************************/
-	@SuppressWarnings("unchecked")
 	private ArrayList<FireburnProperty> loadDataFromXml(String filename) throws JDOMException, IOException, ParseException {
 		ArrayList<FireburnProperty> returnList = new ArrayList<FireburnProperty>();
 		Document doc = new SAXBuilder().build(new File(filename));

=== modified file 'src/org/goobi/production/search/lucene/LuceneIndex.java'
--- src/org/goobi/production/search/lucene/LuceneIndex.java	2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/search/lucene/LuceneIndex.java	2012-07-03 14:18:34 +0000
@@ -71,8 +71,6 @@
 
 	static RAMDirectory ramDir = null;
 	private static String index_path = "";
-	private static String analyser_path = "";
-
 	static Analyzer analyser;
 	private static LuceneIndex li;
 	private static MaxFieldLength mfl = new MaxFieldLength(1000);

=== modified file 'src/org/goobi/production/search/lucene/LuceneSearch.java'
--- src/org/goobi/production/search/lucene/LuceneSearch.java	2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/search/lucene/LuceneSearch.java	2012-07-03 14:18:34 +0000
@@ -53,7 +53,6 @@
 public class LuceneSearch implements ISearch {
 	static Analyzer analyser;
 	private static String index_path = "";
-	private static String analyser_path = "";
 	static LuceneSearch search;
 	private static final Logger logger = Logger.getLogger(LuceneSearch.class);
 	private Version luceneVersion = Version.LUCENE_24;

=== modified file 'test/src/de/sub/goobi/helper/FilesystemHelperTest.java'
--- test/src/de/sub/goobi/helper/FilesystemHelperTest.java	2012-05-10 13:52:57 +0000
+++ test/src/de/sub/goobi/helper/FilesystemHelperTest.java	2012-07-03 14:18:34 +0000
@@ -22,21 +22,18 @@
 
 package de.sub.goobi.helper;
 
+import static junit.framework.Assert.fail;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.apache.log4j.BasicConfigurator;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
-
 import org.junit.Test;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.fail;
-
-import org.apache.log4j.BasicConfigurator;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-
 public class FilesystemHelperTest {
 
 	@BeforeClass

=== modified file 'test/src/de/sub/goobi/helper/importer/ImportOpacTest.java'
--- test/src/de/sub/goobi/helper/importer/ImportOpacTest.java	2012-02-22 07:43:02 +0000
+++ test/src/de/sub/goobi/helper/importer/ImportOpacTest.java	2012-07-03 14:18:34 +0000
@@ -9,8 +9,6 @@
 @Ignore("Test defintion incorrect.")
 public class ImportOpacTest {
    public static void main(String[] args) {
-      Helper help = new Helper();
-      String docType = "monograph";
       String atstsl = "";
       try {
          ImportOpac myImportOpac = new ImportOpac();
@@ -23,7 +21,7 @@
          System.out.println(atstsl);
          myRdf.write(args[1]);
       } catch (Exception e) {
-         help.setFehlerMeldung("Fehler beim Einlesen des Opac-Ergebnisses ", e);
+         Helper.setFehlerMeldung("Fehler beim Einlesen des Opac-Ergebnisses ", e);
          e.printStackTrace();
       }
 

=== modified file 'test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java'
--- test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java	2012-02-22 07:43:02 +0000
+++ test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java	2012-07-03 14:18:34 +0000
@@ -10,18 +10,14 @@
 import org.goobi.production.flow.statistics.IDataSource;
 import org.goobi.production.flow.statistics.enums.CalculationUnit;
 import org.goobi.production.flow.statistics.enums.TimeUnit;
-import org.hibernate.cfg.Configuration;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import com.lowagie.text.pdf.hyphenation.TernaryTree.Iterator;
-
 import de.intranda.commons.chart.renderer.ChartRenderer;
 import de.intranda.commons.chart.renderer.IRenderer;
 import de.intranda.commons.chart.results.DataRow;
 import de.intranda.commons.chart.results.DataTable;
-import de.sub.goobi.persistence.HibernateUtil;
 
 public class StatQuestCorrectionsTest {
 	static StatQuestCorrections test;

=== modified file 'test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java'
--- test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java	2012-02-22 07:43:02 +0000
+++ test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java	2012-07-03 14:18:34 +0000
@@ -13,7 +13,6 @@
 import org.goobi.production.flow.statistics.enums.CalculationUnit;
 import org.goobi.production.flow.statistics.enums.StatisticsMode;
 import org.goobi.production.flow.statistics.enums.TimeUnit;
-import org.hibernate.cfg.Configuration;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -23,7 +22,6 @@
 import de.intranda.commons.chart.renderer.IRenderer;
 import de.intranda.commons.chart.results.DataRow;
 import de.intranda.commons.chart.results.DataTable;
-import de.sub.goobi.persistence.HibernateUtil;
 import de.sub.goobi.helper.Helper;
 import de.sub.goobi.helper.exceptions.DAOException;
 


Follow ups