So my first pull request at fixing our JAI start up warnings is getting
rejected as not maintainable.

        // Custom GeoTools ImagingListener used to ignore common warnings
        JAI.getDefaultInstance().setImagingListener(new ImagingListener() {
            final Logger LOGGER = Logging.getLogger("javax.media.jai");
            @Override
            public boolean errorOccurred(String message, Throwable thrown,
Object where,
                    boolean isRetryable) throws RuntimeException {
                if (message.contains("Continuing in pure Java mode")) {
                    LOGGER.log(Level.FINE, message, thrown);
                } else {
                    LOGGER.log(Level.INFO, message, thrown);
                }
                return false; // we are not trying to recover
            }
        });

Briefly GeoTools.init() was going to register an ImagingListener. The
rejected pull request added GeoTools.init() to each test case @Before
method.

In todays meeting we hit on another approach. In the static init of our
logging class I will check if JAI has an ImagingListener, and if it is null
I will add in our own.

--
Jody Garnett
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to