Merge lp:~zeutschel/goobi-production/various-warnings into lp:goobi-production/1.8
- various-warnings
- Merge into 1.8
Proposed by
Matthias Ronge
Status: | Merged |
---|---|
Merged at revision: | 75 |
Proposed branch: | lp:~zeutschel/goobi-production/various-warnings |
Merge into: | lp:goobi-production/1.8 |
Diff against target: |
611 lines (+34/-92) 29 files modified
src-dubious/dubious/sub/goobi/helper/Page.java (+0/-1) src/de/sub/goobi/beans/Benutzer.java (+1/-2) src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java (+0/-1) src/de/sub/goobi/forms/HelperForm.java (+2/-13) src/de/sub/goobi/forms/ProjekteForm.java (+0/-1) src/de/sub/goobi/forms/SessionForm.java (+2/-5) src/de/sub/goobi/helper/Helper.java (+0/-1) src/de/sub/goobi/helper/PaginatingCriteria.java (+0/-2) src/de/sub/goobi/helper/WebDav.java (+6/-4) src/de/sub/goobi/helper/ldap/Ldap.java (+1/-2) src/de/sub/goobi/metadaten/Metadaten.java (+1/-8) src/de/sub/goobi/modul/ExtendedDataImpl.java (+2/-6) src/de/sub/goobi/persistence/BaseDAO.java (+6/-6) src/org/goobi/io/BackupFileRotation.java (+4/-4) src/org/goobi/production/chart/HibernateProjectTaskList.java (+0/-2) src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java (+0/-1) src/org/goobi/production/cli/helper/CopyProcess.java (+0/-3) src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java (+0/-1) src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java (+0/-1) src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java (+0/-1) src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java (+0/-1) src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java (+1/-3) src/org/goobi/production/importer/FireburnDataImport.java (+0/-1) src/org/goobi/production/search/lucene/LuceneIndex.java (+0/-2) src/org/goobi/production/search/lucene/LuceneSearch.java (+0/-1) test/src/de/sub/goobi/helper/FilesystemHelperTest.java (+7/-10) test/src/de/sub/goobi/helper/importer/ImportOpacTest.java (+1/-3) test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java (+0/-4) test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java (+0/-2) |
To merge this branch: | bzr merge lp:~zeutschel/goobi-production/various-warnings |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ralf Claussnitzer (community) | Approve | ||
Review via email: mp+113219@code.launchpad.net |
Commit message
Description of the change
This fixes some coding issues such as unused imports and variables and a bunch of @SuppressWarnin
To post a comment you must log in.
Revision history for this message
Ralf Claussnitzer (ralf-claussnitzer-deactivatedaccount) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src-dubious/dubious/sub/goobi/helper/Page.java' |
2 | --- src-dubious/dubious/sub/goobi/helper/Page.java 2012-03-10 13:34:49 +0000 |
3 | +++ src-dubious/dubious/sub/goobi/helper/Page.java 2012-07-03 14:18:34 +0000 |
4 | @@ -23,7 +23,6 @@ |
5 | * @author Gavin King |
6 | * @author Eric Broyles |
7 | */ |
8 | -@SuppressWarnings("unchecked") |
9 | public class Page implements Serializable { |
10 | private static final long serialVersionUID = -290320409344472392L; |
11 | //TODO: Use generics |
12 | |
13 | === modified file 'src/de/sub/goobi/beans/Benutzer.java' |
14 | --- src/de/sub/goobi/beans/Benutzer.java 2012-04-24 12:00:57 +0000 |
15 | +++ src/de/sub/goobi/beans/Benutzer.java 2012-07-03 14:18:34 +0000 |
16 | @@ -32,9 +32,8 @@ |
17 | |
18 | import de.sub.goobi.config.ConfigMain; |
19 | import de.sub.goobi.helper.FilesystemHelper; |
20 | -import de.sub.goobi.helper.Helper; |
21 | +import de.sub.goobi.helper.ldap.Ldap; |
22 | import dubious.sub.goobi.helper.encryption.DesEncrypter; |
23 | -import de.sub.goobi.helper.ldap.Ldap; |
24 | |
25 | public class Benutzer implements Serializable { |
26 | private static final long serialVersionUID = -7482853955996650586L; |
27 | |
28 | === modified file 'src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java' |
29 | --- src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java 2012-02-22 07:43:02 +0000 |
30 | +++ src/de/sub/goobi/export/dms/ExportDms_CorrectRusdml.java 2012-07-03 14:18:34 +0000 |
31 | @@ -96,7 +96,6 @@ |
32 | * @throws MetadataTypeNotAllowedException |
33 | * @throws DocStructHasNoTypeException |
34 | */ |
35 | - @SuppressWarnings("unchecked") |
36 | private void RusdmlDocStructPagesAuswerten(DocStruct inStruct) throws DocStructHasNoTypeException, MetadataTypeNotAllowedException { |
37 | |
38 | RusdmlDropMetadata(inStruct); |
39 | |
40 | === modified file 'src/de/sub/goobi/forms/HelperForm.java' |
41 | --- src/de/sub/goobi/forms/HelperForm.java 2012-04-24 13:22:01 +0000 |
42 | +++ src/de/sub/goobi/forms/HelperForm.java 2012-07-03 14:18:34 +0000 |
43 | @@ -145,7 +145,7 @@ |
44 | // TODO: Avoid SQL here |
45 | List<Regelsatz> temp = new RegelsatzDAO().search("from Regelsatz ORDER BY titel"); |
46 | for (Iterator<Regelsatz> iter = temp.iterator(); iter.hasNext();) { |
47 | - Regelsatz an = (Regelsatz) iter.next(); |
48 | + Regelsatz an = iter.next(); |
49 | myPrefs.add(new SelectItem(an, an.getTitel(), null)); |
50 | } |
51 | return myPrefs; |
52 | @@ -189,19 +189,8 @@ |
53 | return reqUrl; |
54 | } |
55 | |
56 | - // TODO: Try to avoid Iterators, usr for loops instead |
57 | - @SuppressWarnings( { "unchecked", "unused" }) |
58 | public boolean getMessagesExist() { |
59 | - boolean rueck = false; |
60 | - FacesContext context = FacesContext.getCurrentInstance(); |
61 | - for (Iterator it = context.getClientIdsWithMessages(); it.hasNext();) { |
62 | - Object o = it.next(); |
63 | - } |
64 | - for (Iterator it = context.getMessages(); it.hasNext();) { |
65 | - FacesMessage o = (FacesMessage) it.next(); |
66 | - rueck = true; |
67 | - } |
68 | - return rueck; |
69 | + return FacesContext.getCurrentInstance().getMessages().hasNext(); |
70 | } |
71 | |
72 | public List<SelectItem> getCssFiles() { |
73 | |
74 | === modified file 'src/de/sub/goobi/forms/ProjekteForm.java' |
75 | --- src/de/sub/goobi/forms/ProjekteForm.java 2012-03-10 13:33:00 +0000 |
76 | +++ src/de/sub/goobi/forms/ProjekteForm.java 2012-07-03 14:18:34 +0000 |
77 | @@ -339,7 +339,6 @@ |
78 | * generates values for count of volumes and images for statistics |
79 | */ |
80 | |
81 | - @SuppressWarnings("unchecked") |
82 | public void GenerateValuesForStatistics() { |
83 | Criteria crit = Helper.getHibernateSession().createCriteria(Prozess.class).add(Restrictions.eq("projekt", myProjekt)); |
84 | ProjectionList pl = Projections.projectionList(); |
85 | |
86 | === modified file 'src/de/sub/goobi/forms/SessionForm.java' |
87 | --- src/de/sub/goobi/forms/SessionForm.java 2012-02-22 07:43:02 +0000 |
88 | +++ src/de/sub/goobi/forms/SessionForm.java 2012-07-03 14:18:34 +0000 |
89 | @@ -44,8 +44,7 @@ |
90 | public class SessionForm { |
91 | |
92 | private int sessionZeit = 3600 * 2; // 2 Stunden |
93 | - @SuppressWarnings("unchecked") |
94 | -private List alleSessions = new ArrayList(); |
95 | + private List alleSessions = new ArrayList(); |
96 | private SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); |
97 | private String aktuelleZeit = formatter.format(new Date()); |
98 | private String bitteAusloggen = ""; |
99 | @@ -67,7 +66,6 @@ |
100 | |
101 | |
102 | |
103 | - @SuppressWarnings("unchecked") |
104 | public List getAlleSessions() { |
105 | try { |
106 | return alleSessions; |
107 | @@ -183,8 +181,7 @@ |
108 | |
109 | |
110 | /* prüfen, ob der Benutzer in einer anderen Session aktiv ist */ |
111 | - @SuppressWarnings("unchecked") |
112 | -public boolean BenutzerInAndererSessionAktiv(HttpSession insession, Benutzer inBenutzer) { |
113 | + public boolean BenutzerInAndererSessionAktiv(HttpSession insession, Benutzer inBenutzer) { |
114 | boolean rueckgabe = false; |
115 | //TODO: Don't use Iterators |
116 | for (Iterator iter = alleSessions.iterator(); iter.hasNext();) { |
117 | |
118 | === modified file 'src/de/sub/goobi/helper/Helper.java' |
119 | --- src/de/sub/goobi/helper/Helper.java 2012-05-30 08:24:19 +0000 |
120 | +++ src/de/sub/goobi/helper/Helper.java 2012-07-03 14:18:34 +0000 |
121 | @@ -65,7 +65,6 @@ |
122 | * |
123 | * @return Paramter als String |
124 | */ |
125 | - @SuppressWarnings("unchecked") |
126 | public static String getRequestParameter(String Parameter) { |
127 | /* einen bestimmten übergebenen Parameter ermitteln */ |
128 | FacesContext context = FacesContext.getCurrentInstance(); |
129 | |
130 | === modified file 'src/de/sub/goobi/helper/PaginatingCriteria.java' |
131 | --- src/de/sub/goobi/helper/PaginatingCriteria.java 2011-12-20 08:07:09 +0000 |
132 | +++ src/de/sub/goobi/helper/PaginatingCriteria.java 2012-07-03 14:18:34 +0000 |
133 | @@ -76,7 +76,6 @@ |
134 | * @param clazz |
135 | * @param session |
136 | */ |
137 | - @SuppressWarnings("unchecked") |
138 | public PaginatingCriteria(Class clazz, Session session) { |
139 | criteria = session.createCriteria(clazz); |
140 | clone = session.createCriteria(clazz); |
141 | @@ -344,7 +343,6 @@ |
142 | * @return List |
143 | * @see Criteria#list() |
144 | */ |
145 | - @SuppressWarnings("unchecked") |
146 | public List list() throws HibernateException { |
147 | return criteria.list(); |
148 | } |
149 | |
150 | === modified file 'src/de/sub/goobi/helper/WebDav.java' |
151 | --- src/de/sub/goobi/helper/WebDav.java 2012-04-24 12:00:57 +0000 |
152 | +++ src/de/sub/goobi/helper/WebDav.java 2012-07-03 14:18:34 +0000 |
153 | @@ -23,18 +23,21 @@ |
154 | package de.sub.goobi.helper; |
155 | |
156 | //TODO: Replace with a VFS |
157 | -import java.io.*; |
158 | +import java.io.BufferedWriter; |
159 | +import java.io.File; |
160 | +import java.io.FileOutputStream; |
161 | +import java.io.FilenameFilter; |
162 | +import java.io.OutputStreamWriter; |
163 | import java.util.ArrayList; |
164 | import java.util.Arrays; |
165 | -import java.util.Iterator; |
166 | import java.util.List; |
167 | |
168 | import org.apache.log4j.Logger; |
169 | |
170 | import de.sub.goobi.beans.Benutzer; |
171 | import de.sub.goobi.beans.Prozess; |
172 | +import de.sub.goobi.config.ConfigMain; |
173 | import de.sub.goobi.export.download.TiffHeader; |
174 | -import de.sub.goobi.config.ConfigMain; |
175 | |
176 | public class WebDav { |
177 | private static final Logger myLogger = Logger.getLogger(WebDav.class); |
178 | @@ -135,7 +138,6 @@ |
179 | } |
180 | |
181 | public void DownloadToHome(Prozess myProzess, int inSchrittID, boolean inNurLesen) { |
182 | - Helper help = new Helper(); |
183 | saveTiffHeader(myProzess); |
184 | Benutzer aktuellerBenutzer = (Benutzer) Helper.getManagedBeanValue("#{LoginForm.myBenutzer}"); |
185 | String von = ""; |
186 | |
187 | === modified file 'src/de/sub/goobi/helper/ldap/Ldap.java' |
188 | --- src/de/sub/goobi/helper/ldap/Ldap.java 2012-04-24 12:00:57 +0000 |
189 | +++ src/de/sub/goobi/helper/ldap/Ldap.java 2012-07-03 14:18:34 +0000 |
190 | @@ -46,14 +46,13 @@ |
191 | import javax.naming.directory.ModificationItem; |
192 | import javax.naming.directory.SearchResult; |
193 | |
194 | -import dubious.sub.goobi.helper.encryption.MD4; |
195 | import org.apache.commons.codec.binary.Base64; |
196 | import org.apache.log4j.Logger; |
197 | |
198 | import de.sub.goobi.beans.Benutzer; |
199 | import de.sub.goobi.config.ConfigMain; |
200 | import de.sub.goobi.helper.FilesystemHelper; |
201 | -import de.sub.goobi.helper.Helper; |
202 | +import dubious.sub.goobi.helper.encryption.MD4; |
203 | |
204 | public class Ldap { |
205 | private static final Logger myLogger = Logger.getLogger(Ldap.class); |
206 | |
207 | === modified file 'src/de/sub/goobi/metadaten/Metadaten.java' |
208 | --- src/de/sub/goobi/metadaten/Metadaten.java 2012-05-09 16:53:48 +0000 |
209 | +++ src/de/sub/goobi/metadaten/Metadaten.java 2012-07-03 14:18:34 +0000 |
210 | @@ -227,11 +227,10 @@ |
211 | if (!SperrungAktualisieren()) { |
212 | return "SperrungAbgelaufen"; |
213 | } else { |
214 | - boolean successfulStore; |
215 | calculateMetadataAndImages(); |
216 | cleanupMetadata(); |
217 | // ignoring result of store operation |
218 | - successfulStore = storeMetadata(); |
219 | + storeMetadata(); |
220 | return ""; |
221 | } |
222 | } |
223 | @@ -733,7 +732,6 @@ |
224 | * ##################################################### #################################################### |
225 | */ |
226 | |
227 | - @SuppressWarnings("unchecked") |
228 | private String MetadatenalsTree3Einlesen1() { |
229 | HashMap map; |
230 | TreeNodeStruct3 knoten; |
231 | @@ -803,7 +801,6 @@ |
232 | if (inStrukturelement.getType().getName().equals("Periodical") || inStrukturelement.getType().getName().equals("PeriodicalVolume")) |
233 | OberKnoten.setExpanded(true); |
234 | |
235 | - int zaehler = 0; |
236 | /* |
237 | * -------------------------------- vom aktuellen Strukturelement alle Kinder in den Tree packen -------------------------------- |
238 | */ |
239 | @@ -815,7 +812,6 @@ |
240 | if (label == null) |
241 | label = kind.getType().getName(); |
242 | TreeNodeStruct3 tns = new TreeNodeStruct3(label, kind); |
243 | - zaehler++; |
244 | OberKnoten.addChild(tns); |
245 | MetadatenalsTree3Einlesen2(kind, tns); |
246 | } |
247 | @@ -840,7 +836,6 @@ |
248 | return rueckgabe.trim(); |
249 | } |
250 | |
251 | - @SuppressWarnings("unchecked") |
252 | public void setMyStrukturelement(DocStruct inStruct) { |
253 | modusHinzufuegen = false; |
254 | modusHinzufuegenPerson = false; |
255 | @@ -1824,7 +1819,6 @@ |
256 | /** |
257 | * die erste und die letzte Seite festlegen und alle dazwischen zuweisen ================================================================ |
258 | */ |
259 | - @SuppressWarnings("unchecked") |
260 | public String SeitenVonChildrenUebernehmen() { |
261 | if (!SperrungAktualisieren()) |
262 | return "SperrungAbgelaufen"; |
263 | @@ -2285,7 +2279,6 @@ |
264 | TreeDurchlaufen(tree3); |
265 | } |
266 | |
267 | - @SuppressWarnings("unchecked") |
268 | private void TreeDurchlaufen(TreeNodeStruct3 inTreeStruct) { |
269 | DocStruct temp = inTreeStruct.getStruct(); |
270 | if (inTreeStruct.getStruct() == myDocStruct) |
271 | |
272 | === modified file 'src/de/sub/goobi/modul/ExtendedDataImpl.java' |
273 | --- src/de/sub/goobi/modul/ExtendedDataImpl.java 2012-02-22 07:43:02 +0000 |
274 | +++ src/de/sub/goobi/modul/ExtendedDataImpl.java 2012-07-03 14:18:34 +0000 |
275 | @@ -75,9 +75,7 @@ |
276 | * @return Status (Fehler) |
277 | * @throws GoobiException: 1, 2, 6, 7, 254, 1500, 1501, 1502 |
278 | * ================================================================*/ |
279 | - //TODO: Use generics |
280 | - @SuppressWarnings("unchecked") |
281 | -public int add(String sessionId, String type, int count, HashMap pp) throws GoobiException { |
282 | + public int add(String sessionId, String type, int count, HashMap pp) throws GoobiException { |
283 | super.add(sessionId, type, count, pp); |
284 | Prozess p = ModuleServerForm.getProcessFromShortSession(sessionId); |
285 | GoobiProcessProperty gpp = new GoobiProcessProperty(pp); |
286 | @@ -252,9 +250,7 @@ |
287 | * @return Status (Fehler) |
288 | * @throws GoobiException: 1, 2, 6, 7, 254, 1501, 1502 |
289 | * ================================================================*/ |
290 | - //TODO: Use generics |
291 | - @SuppressWarnings("unchecked") |
292 | -public int set(String sessionId, String type, int count, HashMap pp) throws GoobiException { |
293 | + public int set(String sessionId, String type, int count, HashMap pp) throws GoobiException { |
294 | super.set(sessionId, type, count, pp); |
295 | Prozess p = ModuleServerForm.getProcessFromShortSession(sessionId); |
296 | GoobiProcessProperty gpp = new GoobiProcessProperty(pp); |
297 | |
298 | === modified file 'src/de/sub/goobi/persistence/BaseDAO.java' |
299 | --- src/de/sub/goobi/persistence/BaseDAO.java 2012-03-28 13:06:13 +0000 |
300 | +++ src/de/sub/goobi/persistence/BaseDAO.java 2012-07-03 14:18:34 +0000 |
301 | @@ -15,16 +15,16 @@ |
302 | */ |
303 | package de.sub.goobi.persistence; |
304 | |
305 | -import de.sub.goobi.helper.Helper; |
306 | -import de.sub.goobi.helper.Util; |
307 | -import de.sub.goobi.helper.exceptions.DAOException; |
308 | +import java.io.Serializable; |
309 | +import java.sql.SQLException; |
310 | +import java.util.List; |
311 | + |
312 | import org.hibernate.HibernateException; |
313 | import org.hibernate.Query; |
314 | import org.hibernate.Session; |
315 | |
316 | -import java.io.Serializable; |
317 | -import java.sql.SQLException; |
318 | -import java.util.List; |
319 | +import de.sub.goobi.helper.Helper; |
320 | +import de.sub.goobi.helper.exceptions.DAOException; |
321 | |
322 | /** |
323 | * Base class for DAOs. This class defines common CRUD methods. |
324 | |
325 | === modified file 'src/org/goobi/io/BackupFileRotation.java' |
326 | --- src/org/goobi/io/BackupFileRotation.java 2012-05-10 13:57:31 +0000 |
327 | +++ src/org/goobi/io/BackupFileRotation.java 2012-07-03 14:18:34 +0000 |
328 | @@ -22,14 +22,14 @@ |
329 | |
330 | package org.goobi.io; |
331 | |
332 | -import de.sub.goobi.helper.FilesystemHelper; |
333 | -import org.apache.log4j.Logger; |
334 | - |
335 | import java.io.File; |
336 | -import java.io.FileNotFoundException; |
337 | import java.io.FilenameFilter; |
338 | import java.io.IOException; |
339 | |
340 | +import org.apache.log4j.Logger; |
341 | + |
342 | +import de.sub.goobi.helper.FilesystemHelper; |
343 | + |
344 | /** |
345 | * Creates backup for files in a given directory that match a regular expression. |
346 | * |
347 | |
348 | === modified file 'src/org/goobi/production/chart/HibernateProjectTaskList.java' |
349 | --- src/org/goobi/production/chart/HibernateProjectTaskList.java 2012-02-22 07:43:02 +0000 |
350 | +++ src/org/goobi/production/chart/HibernateProjectTaskList.java 2012-07-03 14:18:34 +0000 |
351 | @@ -55,9 +55,7 @@ |
352 | |
353 | ScrollableResults list = crit.setCacheMode(CacheMode.IGNORE).scroll(ScrollMode.FORWARD_ONLY); |
354 | |
355 | - int count = 0; |
356 | while (list.next()) { |
357 | - count++; |
358 | Schritt step = (Schritt) list.get(0); |
359 | String shorttitle = (step.getTitel().length() > 60 ? step.getTitel().substring(0, 60) + "..." : step.getTitel()); |
360 | |
361 | |
362 | === modified file 'src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java' |
363 | --- src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java 2012-02-22 07:43:02 +0000 |
364 | +++ src/org/goobi/production/chart/HibernateProjectionProjectTaskList.java 2012-07-03 14:18:34 +0000 |
365 | @@ -57,7 +57,6 @@ |
366 | return myTaskList; |
367 | } |
368 | |
369 | - @SuppressWarnings("unchecked") |
370 | private synchronized void calculate(Projekt inProject, List<IProjectTask> myTaskList, Boolean countImages, Integer inMax) { |
371 | |
372 | Session session = Helper.getHibernateSession(); |
373 | |
374 | === modified file 'src/org/goobi/production/cli/helper/CopyProcess.java' |
375 | --- src/org/goobi/production/cli/helper/CopyProcess.java 2012-02-22 11:26:21 +0000 |
376 | +++ src/org/goobi/production/cli/helper/CopyProcess.java 2012-07-03 14:18:34 +0000 |
377 | @@ -844,7 +844,6 @@ |
378 | return possibleDigitalCollection; |
379 | } |
380 | |
381 | - @SuppressWarnings("unchecked") |
382 | private void initializePossibleDigitalCollections() { |
383 | possibleDigitalCollection = new ArrayList<String>(); |
384 | String filename = new Helper().getGoobiConfigDirectory() + "digitalCollections.xml"; |
385 | @@ -992,7 +991,6 @@ |
386 | /** |
387 | * Prozesstitel und andere Details generieren ================================================================ |
388 | */ |
389 | - @SuppressWarnings("unchecked") |
390 | public void CalcProzesstitel() { |
391 | String newTitle = ""; |
392 | String titeldefinition = ""; |
393 | @@ -1102,7 +1100,6 @@ |
394 | |
395 | /* =============================================================== */ |
396 | |
397 | - @SuppressWarnings("unchecked") |
398 | public void CalcTiffheader() { |
399 | String tif_definition = ""; |
400 | ConfigProjects cp = null; |
401 | |
402 | === modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java' |
403 | --- src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java 2012-04-24 13:22:01 +0000 |
404 | +++ src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java 2012-07-03 14:18:34 +0000 |
405 | @@ -77,7 +77,6 @@ |
406 | * (non-Javadoc) |
407 | * @see org.goobi.production.flow.statistics.IStatisticalQuestion#getDataTables(org.goobi.production.flow.statistics.IDataSource) |
408 | */ |
409 | - @SuppressWarnings("unchecked") |
410 | public List<DataTable> getDataTables(IDataSource dataSource) { |
411 | |
412 | List<DataTable> allTables = new ArrayList<DataTable>(); |
413 | |
414 | === modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java' |
415 | --- src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java 2012-04-24 13:22:01 +0000 |
416 | +++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java 2012-07-03 14:18:34 +0000 |
417 | @@ -70,7 +70,6 @@ |
418 | * |
419 | * @see org.goobi.production.flow.statistics.IStatisticalQuestion#getDataTables(org.goobi.production.flow.statistics.IDataSource) |
420 | ****************************************************************************/ |
421 | - @SuppressWarnings("unchecked") |
422 | public List<DataTable> getDataTables(IDataSource dataSource) { |
423 | |
424 | // contains an intger representing "reihenfolge" in schritte, as defined for this request |
425 | |
426 | === modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java' |
427 | --- src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java 2012-04-24 13:22:01 +0000 |
428 | +++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java 2012-07-03 14:18:34 +0000 |
429 | @@ -320,7 +320,6 @@ |
430 | * read in first in order to get a certain sorting |
431 | * @return DataTable |
432 | */ |
433 | - @SuppressWarnings("unchecked") |
434 | private DataTable buildDataTableFromSQL(String natSQL) { |
435 | Session session = Helper.getHibernateSession(); |
436 | |
437 | |
438 | === modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java' |
439 | --- src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java 2012-04-24 13:22:01 +0000 |
440 | +++ src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java 2012-07-03 14:18:34 +0000 |
441 | @@ -67,7 +67,6 @@ |
442 | * (non-Javadoc) |
443 | * @see org.goobi.production.flow.statistics.IStatisticalQuestion#getDataTables(org.goobi.production.flow.statistics.IDataSource) |
444 | */ |
445 | - @SuppressWarnings("unchecked") |
446 | public List<DataTable> getDataTables(IDataSource dataSource) { |
447 | |
448 | List<DataTable> allTables = new ArrayList<DataTable>(); |
449 | |
450 | === modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java' |
451 | --- src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java 2012-04-24 13:22:01 +0000 |
452 | +++ src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java 2012-07-03 14:18:34 +0000 |
453 | @@ -320,7 +320,7 @@ |
454 | * read in first in order to get a certain sorting |
455 | * @return DataTable |
456 | */ |
457 | - @SuppressWarnings("unchecked") |
458 | + |
459 | //TODO Remove redundant code |
460 | private DataTable buildDataTableFromSQL(String natSQL, String headerFromSQL) { |
461 | Session session = Helper.getHibernateSession(); |
462 | @@ -431,7 +431,6 @@ |
463 | * |
464 | * @param requestedType |
465 | */ |
466 | - @SuppressWarnings("unchecked") |
467 | private Integer getMaxStepCount(HistoryEventType requestedType) { |
468 | |
469 | // adding time restrictions |
470 | @@ -459,7 +458,6 @@ |
471 | * |
472 | * @param requestedType |
473 | */ |
474 | - @SuppressWarnings("unchecked") |
475 | private Integer getMinStepCount(HistoryEventType requestedType) { |
476 | |
477 | // adding time restrictions |
478 | |
479 | === modified file 'src/org/goobi/production/importer/FireburnDataImport.java' |
480 | --- src/org/goobi/production/importer/FireburnDataImport.java 2012-02-22 07:43:02 +0000 |
481 | +++ src/org/goobi/production/importer/FireburnDataImport.java 2012-07-03 14:18:34 +0000 |
482 | @@ -454,7 +454,6 @@ |
483 | * @throws JDOMException |
484 | * @throws ParseException |
485 | *****************************************************************************************/ |
486 | - @SuppressWarnings("unchecked") |
487 | private ArrayList<FireburnProperty> loadDataFromXml(String filename) throws JDOMException, IOException, ParseException { |
488 | ArrayList<FireburnProperty> returnList = new ArrayList<FireburnProperty>(); |
489 | Document doc = new SAXBuilder().build(new File(filename)); |
490 | |
491 | === modified file 'src/org/goobi/production/search/lucene/LuceneIndex.java' |
492 | --- src/org/goobi/production/search/lucene/LuceneIndex.java 2012-02-22 07:43:02 +0000 |
493 | +++ src/org/goobi/production/search/lucene/LuceneIndex.java 2012-07-03 14:18:34 +0000 |
494 | @@ -71,8 +71,6 @@ |
495 | |
496 | static RAMDirectory ramDir = null; |
497 | private static String index_path = ""; |
498 | - private static String analyser_path = ""; |
499 | - |
500 | static Analyzer analyser; |
501 | private static LuceneIndex li; |
502 | private static MaxFieldLength mfl = new MaxFieldLength(1000); |
503 | |
504 | === modified file 'src/org/goobi/production/search/lucene/LuceneSearch.java' |
505 | --- src/org/goobi/production/search/lucene/LuceneSearch.java 2012-02-22 07:43:02 +0000 |
506 | +++ src/org/goobi/production/search/lucene/LuceneSearch.java 2012-07-03 14:18:34 +0000 |
507 | @@ -53,7 +53,6 @@ |
508 | public class LuceneSearch implements ISearch { |
509 | static Analyzer analyser; |
510 | private static String index_path = ""; |
511 | - private static String analyser_path = ""; |
512 | static LuceneSearch search; |
513 | private static final Logger logger = Logger.getLogger(LuceneSearch.class); |
514 | private Version luceneVersion = Version.LUCENE_24; |
515 | |
516 | === modified file 'test/src/de/sub/goobi/helper/FilesystemHelperTest.java' |
517 | --- test/src/de/sub/goobi/helper/FilesystemHelperTest.java 2012-05-10 13:52:57 +0000 |
518 | +++ test/src/de/sub/goobi/helper/FilesystemHelperTest.java 2012-07-03 14:18:34 +0000 |
519 | @@ -22,21 +22,18 @@ |
520 | |
521 | package de.sub.goobi.helper; |
522 | |
523 | +import static junit.framework.Assert.fail; |
524 | + |
525 | +import java.io.File; |
526 | +import java.io.FileWriter; |
527 | +import java.io.IOException; |
528 | + |
529 | +import org.apache.log4j.BasicConfigurator; |
530 | import org.junit.After; |
531 | import org.junit.Before; |
532 | import org.junit.BeforeClass; |
533 | - |
534 | import org.junit.Test; |
535 | |
536 | -import static junit.framework.Assert.assertEquals; |
537 | -import static junit.framework.Assert.fail; |
538 | - |
539 | -import org.apache.log4j.BasicConfigurator; |
540 | - |
541 | -import java.io.File; |
542 | -import java.io.FileWriter; |
543 | -import java.io.IOException; |
544 | - |
545 | public class FilesystemHelperTest { |
546 | |
547 | @BeforeClass |
548 | |
549 | === modified file 'test/src/de/sub/goobi/helper/importer/ImportOpacTest.java' |
550 | --- test/src/de/sub/goobi/helper/importer/ImportOpacTest.java 2012-02-22 07:43:02 +0000 |
551 | +++ test/src/de/sub/goobi/helper/importer/ImportOpacTest.java 2012-07-03 14:18:34 +0000 |
552 | @@ -9,8 +9,6 @@ |
553 | @Ignore("Test defintion incorrect.") |
554 | public class ImportOpacTest { |
555 | public static void main(String[] args) { |
556 | - Helper help = new Helper(); |
557 | - String docType = "monograph"; |
558 | String atstsl = ""; |
559 | try { |
560 | ImportOpac myImportOpac = new ImportOpac(); |
561 | @@ -23,7 +21,7 @@ |
562 | System.out.println(atstsl); |
563 | myRdf.write(args[1]); |
564 | } catch (Exception e) { |
565 | - help.setFehlerMeldung("Fehler beim Einlesen des Opac-Ergebnisses ", e); |
566 | + Helper.setFehlerMeldung("Fehler beim Einlesen des Opac-Ergebnisses ", e); |
567 | e.printStackTrace(); |
568 | } |
569 | |
570 | |
571 | === modified file 'test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java' |
572 | --- test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java 2012-02-22 07:43:02 +0000 |
573 | +++ test/src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrectionsTest.java 2012-07-03 14:18:34 +0000 |
574 | @@ -10,18 +10,14 @@ |
575 | import org.goobi.production.flow.statistics.IDataSource; |
576 | import org.goobi.production.flow.statistics.enums.CalculationUnit; |
577 | import org.goobi.production.flow.statistics.enums.TimeUnit; |
578 | -import org.hibernate.cfg.Configuration; |
579 | import org.junit.BeforeClass; |
580 | import org.junit.Ignore; |
581 | import org.junit.Test; |
582 | |
583 | -import com.lowagie.text.pdf.hyphenation.TernaryTree.Iterator; |
584 | - |
585 | import de.intranda.commons.chart.renderer.ChartRenderer; |
586 | import de.intranda.commons.chart.renderer.IRenderer; |
587 | import de.intranda.commons.chart.results.DataRow; |
588 | import de.intranda.commons.chart.results.DataTable; |
589 | -import de.sub.goobi.persistence.HibernateUtil; |
590 | |
591 | public class StatQuestCorrectionsTest { |
592 | static StatQuestCorrections test; |
593 | |
594 | === modified file 'test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java' |
595 | --- test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java 2012-02-22 07:43:02 +0000 |
596 | +++ test/src/org/goobi/production/flow/statistics/hibernate/StatQuestProductionTest.java 2012-07-03 14:18:34 +0000 |
597 | @@ -13,7 +13,6 @@ |
598 | import org.goobi.production.flow.statistics.enums.CalculationUnit; |
599 | import org.goobi.production.flow.statistics.enums.StatisticsMode; |
600 | import org.goobi.production.flow.statistics.enums.TimeUnit; |
601 | -import org.hibernate.cfg.Configuration; |
602 | import org.junit.AfterClass; |
603 | import org.junit.BeforeClass; |
604 | import org.junit.Ignore; |
605 | @@ -23,7 +22,6 @@ |
606 | import de.intranda.commons.chart.renderer.IRenderer; |
607 | import de.intranda.commons.chart.results.DataRow; |
608 | import de.intranda.commons.chart.results.DataTable; |
609 | -import de.sub.goobi.persistence.HibernateUtil; |
610 | import de.sub.goobi.helper.Helper; |
611 | import de.sub.goobi.helper.exceptions.DAOException; |
612 |