REST client plugin in IntelliJ
Was just browsing the plugins and found this one which is looking good.
It was also available from the plugins list in the settings.

Rest Client intellij plugin screenshot
{ Category Archives }
Was just browsing the plugins and found this one which is looking good.
It was also available from the plugins list in the settings.

Rest Client intellij plugin screenshot
I just discovered that I don’t have the src.jar for my JDK installation and took a bit of ferreting about to find out that you need to download and install the JDK documentation bundle from apple developer site, aswell as the actual jdk.
You can see the thread I found here
The downloads for both the JDK and the associated documentation live here login and go to downloads. You want “Java for Mac OS X Release X” and “Java for Mac OS X Release X Developer documentation”
It then lives in (e.g) /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
I was just getting the following output from XStream when trying to serialize an object which has a collection property:
<addresses class="java.util.Arrays$ArrayList"> <a class="address-array"> <address>
It had to step through the code to see what was going on.
The key is in the subtlety of the type of the list that I was putting in there. Notice that actually its not an java.util.ArrayList its actually an inner class of the Arrays, called, happily $ArrayList, so I had been staring at it the whole time and not noticed.
When XStream serializes its doing the following:
Class actualType = newObj.getClass();
Class defaultType = mapper.defaultImplementationOf(fieldType);
if (!actualType.equals(defaultType)) {
String serializedClassName = mapper.serializedClass(actualType);
if (!serializedClassName.equals(mapper.serializedClass(defaultType))) {
String attributeName = mapper.aliasForSystemAttribute(”class”);
if (attributeName != null) {
writer.addAttribute(attributeName, serializedClassName);
}
}
}
From version 1.3.1 – AbstractReflectionConverter:127
So its asking the mapper what the default implementation of the type is. The type in this case was java.util.List and the default implementation is of course java.util.ArrayList. It is not seeing java.util.Arrays$ArrayList as the same thing and so thinks it needs to specify it.
Now you might be asking, how come I have a strange inner class version of ArrayList ? Well the thing is, I thought I was being clever in the set up of my test data and im using:
addresses = Arrays.asList(
new AddressBuilder().addressType(”home”).streetAddress(”1 The street”).build(),
new AddressBuilder().addressType(”work”).streetAddress(”2 The street”).build(),
new AddressBuilder().addressType(”holiday”).streetAddress(”3 The street”).build()
);
To set up my test data. asList does this:
public static List asList(T… a) {
return new ArrayList(a);
}
private static class ArrayList extends AbstractList
implements RandomAccess, java.io.Serializable
{
private static final long serialVersionUID = -2764017481108945198L;
private Object[] a;
Where it uses its own implementation of ArrayList.
Phew, another fun couple of hours spent there.
I’ve just painfully bruised my brain against this error message when trying to validate an xml against its schema.
The problem is that it is hiding what is really going on, which is that it could not match the namespace uri in the schema document to the one in my xml document.
The xml:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:h="http://some.custom.schema">
<title>/v2/people/facebook.com/@self</title>
<updated>2003-12-13T18:30:02Z</updated>
<h:callId>b702ae86-b07f-4e2f-b49f-27d1a79b7783</h>
</feed>
The xsd
<xs:schema elementFormDefault="qualified"
targetNamespace="http://some.target.namespace.which.does.not.match"
xmlns="http://some.target.namespace.which.does.not.match"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs>
Check it.
![]()
I just discovered Exploding Pixels’ MacWidgets. Its a beautiful library. Literally just pasted a couple of lines of code into my Java app and now it looks right at home on the os x desktop. I’m running JDK 1.6 on Leopard.
Here is is in action:

And here is the code (its been edited slightly so may not copy and paste, but you get the idea) …
MacUtils.makeWindowLeopardStyle(getRootPane());
UnifiedToolBar toolBar = new UnifiedToolBar();
JButton button = new JButton(”My Button”);
button.putClientProperty(”JButton.buttonType”, “textured”);
toolBar.addComponentToLeft(button);
getContentPane().add(toolBar.getComponent(), BorderLayout.NORTH);
BottomBar bottomBar = new BottomBar(BottomBarSize.SMALL);
bottomBar.addComponentToLeft(MacWidgetFactory.createEmphasizedLabel(” Status”));
getContentPane().add(bottomBar.getComponent(), BorderLayout.SOUTH);