you mean Integer.parseInt's potential exception?



On 15 January 2014 15:50, Maikel Wever <notifications@github.com> wrote:

> In
> src/main/java/jenkins/plugins/fogbugz/buildwrappers/FogbugzEnvironmentWrapper.java:
>
> > +        Environment env = new Environment() { };
> > +        EnvVars envVars = new EnvVars();
> > +
> > +        EnvVars currentEnv;
> > +        try {
> > +            currentEnv = build.getEnvironment(listener);
> > +        } catch (Exception e) {
> > +            log.log(Level.INFO, "Failure while retrieving existing environment for build.", e);
> > +            return null;
> > +        }
> > +
> > +        // Fetch case
> > +        FogbugzManager manager = new FogbugzNotifier().getFogbugzManager();
> > +        FogbugzCase fbCase = null;
> > +        try {
> > +            fbCase = manager.getCaseById(Integer.parseInt(currentEnv.get("CASE_ID")));
>
> Same here, this method cannot throw an Exception, so we catch it and do
> not modify environment so build fails in first step.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/paylogic/fogbugz-plugin/pull/4/files#r8897796>
> .
>



-- 
Anatoly Bubenkov