[Schmitzm-commits] r2291 - in trunk: schmitzm-core/src/main/java/de/schmitzm/swing/input schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon Apr 1 21:27:13 CEST 2013


Author: mojays
Date: 2013-04-01 21:27:13 +0200 (Mon, 01 Apr 2013)
New Revision: 2291

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/input/FileInputOption.java
   trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java
Log:
FileInputOption: performBrowse(.) should return NULL when browsing action is canceled
ID3TagUtil: big fix in converting year from string to integer

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/input/FileInputOption.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/input/FileInputOption.java	2013-03-29 15:03:01 UTC (rev 2290)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/input/FileInputOption.java	2013-04-01 19:27:13 UTC (rev 2291)
@@ -125,6 +125,6 @@
       ret = fileChooser.showSaveDialog(this.getInputComponent());
     if ( ret  == JFileChooser.APPROVE_OPTION )
       return fileChooser.getSelectedFile();
-    return (File)actValue;
+    return null;
   }
 }

Modified: trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java
===================================================================
--- trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java	2013-03-29 15:03:01 UTC (rev 2290)
+++ trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java	2013-04-01 19:27:13 UTC (rev 2291)
@@ -338,7 +338,7 @@
       case YEAR:  Integer year = null;
                   if ( tag instanceof ID3V1Tag ) {
                     String yearStr = ((ID3V1Tag)tag).getYear();
-                    year =  !StringUtils.isBlank(yearStr) ? Integer.parseInt(yearStr) : null;
+                    year =  !StringUtils.isBlank(yearStr) ? Integer.parseInt(yearStr.trim()) : null;
                   }
                   if ( tag instanceof ID3V2Tag )
                     year = getYear((ID3V2Tag)tag);



More information about the Schmitzm-commits mailing list