Skip to content

Commit

Permalink
Merge pull request #2 from slandelle/detectContainer
Browse files Browse the repository at this point in the history
Protect against unloadable classes
  • Loading branch information
RichardHightower committed May 21, 2015
2 parents 9c0814a + 66f345f commit f03c37e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reflekt/src/main/java/io/advantageous/boon/core/Sys.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ private static boolean detectContainer () {
Class.forName ( "javax.servlet.http.HttpServlet" );

_inContainer = true;
} catch ( ClassNotFoundException e ) {
} catch ( Throwable e ) {
_inContainer = false;
}
if ( !_inContainer ) {
try {
Class.forName ( "javax.ejb.EJBContext" );

_inContainer = true;
} catch ( ClassNotFoundException e ) {
} catch ( Throwable e ) {
_inContainer = false;
}

Expand Down

0 comments on commit f03c37e

Please sign in to comment.