#153265 implies that IAE can be thrown making an Attributes.Name just because your branding token is too long.
authorJesse Glick <jglick@netbeans.org>
Thu, 20 Nov 2008 15:50:28 -0500
changeset 484265ec66c5134
parent 483 5ad6df2d5e61
child 485 228f2c0b8113
child 891 cb9aa1854b86
#153265 implies that IAE can be thrown making an Attributes.Name just because your branding token is too long.
(FixedModule in fact makes an A.N before calling NbBundle, but the attribute is probably short then - it is the addition of a branding token which makes it arbitrarily long.)
openide.util/src/org/openide/util/Bundle.properties
openide.util/src/org/openide/util/NbBundle.java
     1.1 --- a/openide.util/src/org/openide/util/Bundle.properties	Wed Nov 12 13:37:38 2008 +0100
     1.2 +++ b/openide.util/src/org/openide/util/Bundle.properties	Thu Nov 20 15:50:28 2008 -0500
     1.3 @@ -145,13 +145,6 @@
     1.4  # NbBundle
     1.5  MSG_FMT_ObjectForKey=object for key {0} was not found
     1.6  MSG_ClassFinderAlreadySet=ClassFinder already set.
     1.7 -# Reported MRJ bug workaround:
     1.8 -# {0} - attribute name, e.g. OpenIDE-Module-Name_en_?
     1.9 -# {1} - locale string, e.g. en_?
    1.10 -EXC_bad_attributes_name=\
    1.11 -        An attempt was made to look up a localized manifest attribute named: {0}\n\
    1.12 -        This name is in an invalid format. If you are running the Macintosh MRJ on MacOS X,\n\
    1.13 -        make sure that your locale settings are valid. Currently: {1}
    1.14  
    1.15  
    1.16  #
     2.1 --- a/openide.util/src/org/openide/util/NbBundle.java	Wed Nov 12 13:37:38 2008 +0100
     2.2 +++ b/openide.util/src/org/openide/util/NbBundle.java	Thu Nov 20 15:50:28 2008 -0500
     2.3 @@ -78,7 +78,9 @@
     2.4  * </pre></code>
     2.5  */
     2.6  public class NbBundle extends Object {
     2.7 -    
     2.8 +
     2.9 +    private static final Logger LOG = Logger.getLogger(NbBundle.class.getName());
    2.10 +
    2.11      private static final boolean USE_DEBUG_LOADER = Boolean.getBoolean("org.openide.util.NbBundle.DEBUG"); // NOI18N
    2.12      private static String brandingToken = null;
    2.13  
    2.14 @@ -557,7 +559,7 @@
    2.15                      }
    2.16                  } catch (IOException e) {
    2.17                      Exceptions.attachMessage(e, "While loading: " + res); // NOI18N
    2.18 -                    Logger.getLogger(NbBundle.class.getName()).log(Level.WARNING, null, e);
    2.19 +                    LOG.log(Level.WARNING, null, e);
    2.20  
    2.21                      return null;
    2.22                  }
    2.23 @@ -604,9 +606,9 @@
    2.24              } catch (ClassNotFoundException cnfe) {
    2.25                  // fine - ignore
    2.26              } catch (Exception e) {
    2.27 -                Logger.getLogger(NbBundle.class.getName()).log(Level.WARNING, null, e);
    2.28 +                LOG.log(Level.WARNING, null, e);
    2.29              } catch (LinkageError e) {
    2.30 -                Logger.getLogger(NbBundle.class.getName()).log(Level.WARNING, null, e);
    2.31 +                LOG.log(Level.WARNING, null, e);
    2.32              }
    2.33          }
    2.34  
    2.35 @@ -770,11 +772,7 @@
    2.36                  an = new Attributes.Name(k);
    2.37              } catch (IllegalArgumentException iae) {
    2.38                  // Robustness, and workaround for reported MRJ locale bug:
    2.39 -                Exceptions.attachLocalizedMessage(iae, 
    2.40 -                    getMessage(NbBundle.class, "EXC_bad_attributes_name", k, Locale.getDefault().toString()) 
    2.41 -                );
    2.42 -                Exceptions.printStackTrace(iae);
    2.43 -
    2.44 +                LOG.log(Level.FINE, null, iae);
    2.45                  return null;
    2.46              }
    2.47