Changeset 3743


Ignore:
Timestamp:
Sep 17, 2007, 2:47:03 PM (14 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #753: NullPointerException? in plugin configuration list

Location:
branches/2.4-stable/www/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4-stable/www/admin/jobagents/view_agent.jsp

    r3675 r3743  
    341341          {
    342342            PluginDefinition plugin = null;
     343            NameablePluginAdaptor nameableProxy = null;
    343344            boolean readPlugin = true;
    344345            try
    345346            {
    346347              plugin = settings.getPluginDefinition();
     348              nameableProxy = new NameablePluginAdaptor(plugin);
    347349            }
    348350            catch (PermissionDeniedException ex)
     
    354356            %>
    355357            <tbl:row>
    356               <tbl:cell column="plugin"><%=Base.getLinkedName(ID, new NameablePluginAdaptor(plugin), !readPlugin, true)%></tbl:cell>
     358              <tbl:cell column="plugin"><%=Base.getLinkedName(ID, nameableProxy, !readPlugin, true)%></tbl:cell>
    357359              <tbl:cell column="jarPath"><%=jarPath == null ? "<i>- internal -</i>" : HTML.encodeTags(jarPath)%></tbl:cell>
    358360              <tbl:cell column="trusted"><%=settings.isEffectivelyTrusted()%></tbl:cell>
  • branches/2.4-stable/www/admin/pluginconfigurations/list_configurations.jsp

    r3679 r3743  
    429429              PluginConfiguration item = configurations.next();
    430430              PluginDefinition plugin = null;
     431              Nameable nameableProxy = null;
    431432              contexts.clear();
    432433              try
    433434              {
    434435                plugin = item.getPluginDefinition();
     436                nameableProxy = new NameablePluginAdaptor(plugin);
    435437                contexts.addAll(plugin.getGuiContexts());
    436438              }
     
    490492                <tbl:cell column="pluginType"><%=plugin == null ? "<i>- denied -</i>" : plugin.getMainType().toString()%></tbl:cell>
    491493                <tbl:cell column="contexts"><%=plugin == null ? "<i>- denied -</i>" : (contexts.isEmpty() ? "<i>- none -</i>" : Values.getString(contexts, ", ", true))%></tbl:cell>
    492                 <tbl:cell column="pluginDefinition"><%=mode.hasPropertyLink() ? Base.getLinkedName(ID, new NameablePluginAdaptor(plugin), plugin == null, mode.hasEditLink()): Base.getEncodedName(new NameablePluginAdaptor(plugin), plugin == null)%></a></tbl:cell>
     494                <tbl:cell column="pluginDefinition"><%=mode.hasPropertyLink() ? Base.getLinkedName(ID, nameableProxy, plugin == null, mode.hasEditLink()): Base.getEncodedName(nameableProxy, plugin == null)%></a></tbl:cell>
    493495                <tbl:cell column="owner"
    494496                  ><base:propertyvalue
  • branches/2.4-stable/www/admin/pluginconfigurations/view_configuration.jsp

    r3679 r3743  
    9797  final Set<GuiContext> contexts = new TreeSet<GuiContext>(new ToStringComparator<GuiContext>(false));
    9898  PluginDefinition plugin = null;
     99  Nameable nameableProxy = null;
    99100  boolean readPlugin = true;
    100101  boolean configurable = false;
     
    102103  {
    103104    plugin = configuration.getPluginDefinition();
     105    nameableProxy = new NameablePluginAdaptor(plugin);
    104106    contexts.addAll(plugin.getGuiContexts());
    105107    configurable = plugin.isInteractive() && plugin.supportsConfigurations();
     
    265267        <td class="prompt">Plugin</td>
    266268        <td>
    267           <%=Base.getLinkedName(ID, new NameablePluginAdaptor(plugin), plugin == null, true)%>
     269          <%=Base.getLinkedName(ID, nameableProxy, plugin == null, true)%>
    268270        </td>
    269271      </tr>
Note: See TracChangeset for help on using the changeset viewer.