[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-4912) NPE during publish in PublishCopyUtil.copyFile()

Darryl Miles (JIRA) jira-events at lists.jboss.org
Tue Sep 22 22:22:50 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-4912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12487024#action_12487024 ] 

Darryl Miles commented on JBIDE-4912:
-------------------------------------

Message to Rob...

http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosstools/trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java?r1=17113&r2=17683

Can you emit in the eclipse error log the type of the concrete class "mf" is ?  If the driver suddenly starts to get a new type of concrete class that can not be adapted to File.class surely you want to know about it, so you can deal with it and fix it / evaluate it ?   "JBoss AS Runtime Driver doesn't know how to publish object: " + mf.getClass().getName() + " since object.getAdaptor(File.class)==null";

Maybe thats a bit of a cryptic error, but a user should never see it, if they do its a bug that needs fixing by a developer anyway.

If anything does come along that you really do need to ignore then whitelist:

if(!(mf instanceof ClassWeCanIgnore) && !(mf instanceof AnotherClassWeCanIgnore)) { /* Emit Error Log Message */ }

I'm just thinking defensively on this point!

> NPE during publish in PublishCopyUtil.copyFile()
> ------------------------------------------------
>
>                 Key: JBIDE-4912
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-4912
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: XML Structured Editor
>    Affects Versions: 3.1.0.M2
>            Reporter: Darryl Miles
>            Assignee: Viacheslav Kabanovich
>
> If it is not a JBoss AS Driver bug, i.e. it maybe an Eclipse WTP bug passing null's into lists etc..., then the driver needs to be hardened to it.
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.copyFile(PublishCopyUtil.java:456)
> 	at org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.copy(PublishCopyUtil.java:506)
> 	at org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.publishFull(PublishCopyUtil.java:482)
> 	at org.jboss.ide.eclipse.as.core.publishers.JstPublisher.fullPublish(JstPublisher.java:121)
> 	at org.jboss.ide.eclipse.as.core.publishers.JstPublisher.publishModule(JstPublisher.java:101)
> 	at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.publishModule(DeployableServerBehavior.java:82)
> 	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:948)
> 	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1038)
> 	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:872)
> 	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
> 	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2690)
> 	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:272)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list