Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8067026 Dead Code Cleanup Umbrella Bug
  3. JDK-6717304

Plugin2: simple code clean-up as per Findbugs' result from security audit

    Details

    • Subcomponent:
    • Resolved In Build:
      b05
    • CPU:
      x86
    • OS:
      windows

      Backports

        Description

        Code cleaning can be in several areas for plugin2 as per Findbugs result from security audit:

        1) sun.plugin2.applet.NativeLibraryBundle's static initializer, constructor, copyFiles(), deleteOldDirs(), deleteRecursively() and finalize() ignore exceptional returned values from File.mkdirs(), File.delete()
        2) Method name start with non lower case:
          - sun.plugin2.main.server.IExplorerPlugin.CreateControlWindow(), FinalRelease(), InPlaceActivate(), InPlaceDeactivate(), OnDestroy(), OnDraw(), OnFrameWindowActivate(), OnSetFocus(), SetClientSite(), SetObjectRects(),
          - sun.plugin2.os.windows.Windows: CloseHandle(), ConnectNamedPipe(), CreateEventA(), CreateFileA(), CreateNamedPipeA(), DisconnectNamedPipe(), FlashWindowEx(), GetCurrentProcessId(), GetLastError(), GetVersionExA(), MessageBeep(), OpenEventA(), ReadFile(), ResetEvent(), SetEvent(), WaitForSingleObject(), WriteFile()
        3) Finalizer null fields (not aid in garbage collection)
          - sun.plugin2.applet.Applet2AudioClipFactory.finalize()
        4) Dead local store (assigns a class literal to a variable but never uses it):
          - sun.plugin2.main.client.PluginMain.run()
          - sun.plugin2.applet.Applet2Environment's configProps
          - sun.plugin2.applet.DragHelper.createCloseButton()'s centerX a& centerY
          - sun.plugin2.applet.JNLP2Manager.prepareLaunchFile()'s secureArgs
          - sun.plguin2.main.server.JVMManger.setAppletSize()'s size
        5) Dodgy: Exception caught when it is not thrown:
          - sun.plugin2.applet.Applet2ClassLoader.getResourceAsStream(), resourceExists()
          - sun.plugin2.applet.Plugin2ClassLoader.getDefineClassMethod()
          - sun.plugin2.applet.Plguin2ClassLoader.getUCPField()
          - sun.plugin2.main.client.LiveConnectSupport.doObjectOp()
          - sun.plugin2.main.client.ModalityHelper.reactivate()
          - sun.plugin2.main.server.JVMInstance.$HeartbeatThread.run() ** not valid
          - sun.plugin2.main.server.JVMInstance.$WorkerThread.run() ** not valid

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dtitov Daniil Titov
                  Reporter:
                  cbensen Chris Bensen (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: