Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 91910 invoked from network); 14 Jun 2009 19:55:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Jun 2009 19:55:18 -0000 Received: (qmail 71248 invoked by uid 500); 14 Jun 2009 19:55:29 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 71174 invoked by uid 500); 14 Jun 2009 19:55:29 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 71164 invoked by uid 99); 14 Jun 2009 19:55:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Jun 2009 19:55:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Jun 2009 19:55:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 560DB234C004 for ; Sun, 14 Jun 2009 12:55:07 -0700 (PDT) Message-ID: <1470618152.1245009307338.JavaMail.jira@brutus> Date: Sun, 14 Jun 2009 12:55:07 -0700 (PDT) From: "Filippo Diotalevi (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-1238) NPE when invoking "scr list" with no components registered In-Reply-To: <1378650729.1245009187357.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Filippo Diotalevi updated FELIX-1238: ------------------------------------- Attachment: FELIX-1238.txt The attached patch adds 2 returns statement in the method ScrCommand#private void list( StringTokenizer st, PrintStream out, PrintStream err ) in case there are no components to display > NPE when invoking "scr list" with no components registered > ---------------------------------------------------------- > > Key: FELIX-1238 > URL: https://issues.apache.org/jira/browse/FELIX-1238 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) > Affects Versions: scr-1.0.8 > Reporter: Filippo Diotalevi > Priority: Minor > Fix For: scr-1.0.10 > > Attachments: FELIX-1238.txt > > > The bug can be reproduced with a minimal Felix+SCR container like: > [ 0] [Active ] [ 0] System Bundle (1.8.0) > [ 1] [Active ] [ 1] Apache Felix Shell Service (1.2.0) > [ 2] [Active ] [ 1] Apache Felix Shell TUI (1.2.0) > [ 3] [Active ] [ 1] Apache Felix Bundle Repository (1.4.0) > [ 7] [Active ] [ 1] Apache Felix Declarative Services (1.0.9.SNAPSHOT) > In these condition, typing "scr list" in the shell causes a NPE: > -> scr list > No components registered > Id State Name > Unable to execute command: java.lang.NullPointerException > java.lang.NullPointerException > at org.apache.felix.scr.impl.ScrCommand.list(ScrCommand.java:161) > at org.apache.felix.scr.impl.ScrCommand.execute(ScrCommand.java:102) > at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:291) > at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:177) > at java.lang.Thread.run(Thread.java:637) > The same happens trying to list components of a non-DS bundle > -> svn list 3 > Bundle 3 declares no components > Id State Name > Unable to execute command: java.lang.NullPointerException > java.lang.NullPointerException > at org.apache.felix.scr.impl.ScrCommand.list(ScrCommand.java:161) > at org.apache.felix.scr.impl.ScrCommand.execute(ScrCommand.java:102) > at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:291) > at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:177) > at java.lang.Thread.run(Thread.java:637) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.