@Test public void testDefaultSuffix() { Properties props = new Properties(); props.setProperty( SuffixState.SUFFIX_STRIP_PROPERTY, "" ); SuffixState s = new SuffixState( props ); Pattern p = Pattern.compile( s.getSuffixStrip() ); Matcher m = p.matcher( "1.0.jbossorg-101909" ); assertTrue( m.matches() ); assertEquals( "1.0", m.group( 1 ) ); assertEquals( ".jbossorg-101909", m.group( 2 ) ); m = p.matcher( "1.0.Final-jbossorg-1" ); assertTrue( m.matches() ); assertEquals( "1.0.Final", m.group( 1 ) ); assertEquals( "-jbossorg-1", m.group( 2 ) ); }
public String getSuffixStrip() { return suffixStrip; }
SuffixState implements State { public String getSuffixStrip() { return suffixStrip; } }
SuffixState implements State { public String getSuffixStrip() { return suffixStrip; } SuffixState( final Properties userProps ); }
SuffixState implements State { public String getSuffixStrip() { return suffixStrip; } SuffixState( final Properties userProps ); void initialise( Properties userProps ); @Override boolean isEnabled(); String getSuffixStrip(); }
SuffixState implements State { public String getSuffixStrip() { return suffixStrip; } SuffixState( final Properties userProps ); void initialise( Properties userProps ); @Override boolean isEnabled(); String getSuffixStrip();  }