Be Careful With Apache Wicket’s isVisible

Geek7 Comments

I see this all the time: class MyPage extends WebPage { MyPage() { MyComponent myComponent = new MyComponent(“myComponent”); add(myComponent); myComponent.setVisible(isMyConditionMet()); } } Looks harmless I suppose but issues develop as the code does. A new link gets added to the page. Then the author finds out that they need to re-calculate the visibility of myComponent, so they call it there … Read More

Side Effects of Apache Wicket’s assertModelValue

GeekLeave a Comment

Whenever a defect is found in my application, my first thought is always the same — I SUCK. After that wears off in 10 seconds, I move on to wondering how I let it slip through the cracks. Often before even diagnosing what the fix would be, I jump into my unit tests and start coding up a test that … Read More

Javassist Messes With Custom Object Equals Implementation

Geek10 Comments

Posting another debugging nightmare so I can hopefully spare someone the pain that I endured today… So we have these POJOs with relatively straightforward looking overrides of the Object.equals() method. Here we go: class Whitelist { private String id; @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return … Read More

Cannot recreate collection while filter is enabled

Geek4 Comments

I have been meaning to start posting some of my new tips, tricks, and general crap I have gotten stuck on in my new life as a Java web developer. Need to go back through my notes but here was one from today. Google shows no hits for this Hibernate error message: cannot recreate collection while filter is enabled This … Read More

Tick Tock

Work1 Comment

Every couple of months, I get involved with some bug fix that takes weeks to resolve. I just finished up one this morning. I have been working on it for about 3 weeks nearly steadily. However, the bug has loomed in various forms for several years in our product. In the end, the solution was the same as a lot … Read More