[ 
https://issues.apache.org/jira/browse/JCR-4283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Szymon Owczarzak updated JCR-4283:
----------------------------------
    Description: 
When using:
{code:java}
PackagingService.getPackageManager(session)
{code}
Stack trace is logged on INFO level.
{code:java}
public static JcrPackageManager getPackageManager(Session session) {
        try {
            throw new IllegalStateException();
        } catch (IllegalStateException e) {
            log.info("JcrPackageManager acquired w/o service! Alternate package 
roots will not be respected.", e); // maybe better message should be used 
without whole stacktrace ?
        }

        // todo: should somehow pass the package roots
        return new JcrPackageManagerImpl(session, new String[0]);
    }
{code}
[https://svn.apache.org/repos/asf/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackagingService.java]

  was:
When using:
{code:java}
PackagingService.getPackageManager(session)
{code}
method, ugly stack trace is logged on INFO level.
{code:java}
public static JcrPackageManager getPackageManager(Session session) {
        try {
            throw new IllegalStateException();
        } catch (IllegalStateException e) {
            log.info("JcrPackageManager acquired w/o service! Alternate package 
roots will not be respected.", e); // maybe better message should be used 
without whole stacktrace ?
        }

        // todo: should somehow pass the package roots
        return new JcrPackageManagerImpl(session, new String[0]);
    }
{code}
https://svn.apache.org/repos/asf/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackagingService.java


> IllegalStateException logged on INFO level when using PackagingService
> ----------------------------------------------------------------------
>
>                 Key: JCR-4283
>                 URL: https://issues.apache.org/jira/browse/JCR-4283
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Szymon Owczarzak
>            Priority: Major
>
> When using:
> {code:java}
> PackagingService.getPackageManager(session)
> {code}
> Stack trace is logged on INFO level.
> {code:java}
> public static JcrPackageManager getPackageManager(Session session) {
>         try {
>             throw new IllegalStateException();
>         } catch (IllegalStateException e) {
>             log.info("JcrPackageManager acquired w/o service! Alternate 
> package roots will not be respected.", e); // maybe better message should be 
> used without whole stacktrace ?
>         }
>         // todo: should somehow pass the package roots
>         return new JcrPackageManagerImpl(session, new String[0]);
>     }
> {code}
> [https://svn.apache.org/repos/asf/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/PackagingService.java]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to