What? There are various reasons when we have to wrap java exceptions. Often those reasons are called: Checked Exceptions. According to the definition there are 2 types of exceptions:
I get tones of exceptions in my code because I tend to use Generics in the old-fashioned way. I have my reasons for that. And I have tons of warnings like those: HashMap is a raw type. References to generic type HashMap should be parameterized Type safety: The method put(Object, Object) belongs to the raw [...]
04 Aug
Posted by: admin in: Java, java snippets, java web apps
There are two options to store parameters in web.xml: – context parameters – available to the entire scope of the web application – init parameters – available in the context of a servlet or filter in the web application Context Parameters
Java properties files are just simple text files that are widely used in Java to store different properties which should not be hard coded in java source files. By convention, properties files should have the .properties extension. They have a simple structure, each line defining a key/value pair. It is also possible to define larger [...]
30 May
Posted by: admin in: Design Patterns, Object Oriented Design
The visitor pattern can be used on structures of objects which implements a specific interface defining a method called accept. In practice, in many cases, the structures are already created and we have to visit structures of already created objects. Changing hierarchies of classes for adding a new method is not a viable solution. We [...]
20 May
Posted by: admin in: Eclipse
I’ve installed the eclipse plugin for bazaar. For me Bazaar is installed in C:\Java(don’t ask why I put it there, because I don’t know).
What is Google Guice Google Guice is a light java dependency inversion framework using annotations. It is developed by Google(Bob Lee and Kevin Bourrillion) and it is used internally by Google for their applications. Google Guice is sometimes considered an Inversion of Control Container but as their authors state it’s not a container, it’s just [...]
I just noticed something strange happened to me and it happened not only once. I tried to edit some xml file and just wanted to write a simple tag: <strong>. I tried it once and guess what happened: by some miracle the tag written there was <string>. I corrected and then tried to close the tag: </strong>. Again I got
I just took the Google Collections Library and start playing with it. I discovered a class I needed in many and many situations in the past. I’m talking about Multimap. Actually Multimap is an interface having a few classes implementing it. Along with some other interfaces it comes to fulfill a gap in the Java [...]
Google Guice is a an open source Java framework released by Google under Apache License 2.0. Guice is a light weight Inversion of Control Container. It does what Spring does regarding dependency inversion aspect, without using xml files. Guide uses annotations and requires Java 1.5 or above and follows the Google philosophy of being really easy to use.