You may face NPEs here. You must either test for label nullity or throw manually some documented NPE's in other places (constructor, setters if any). And you should check for s nullity too. I know that's sad :-( Rather than NPE's, you could use a default value for label. But not for s.