mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-05 12:41:08 +01:00
Normalize newlines to '\n'
Change all \r\n into unix style newlines. Add missing newlines at the end of a file and activate the newline checkstyle module, that enforces '\n' as newline and a newline at the end of every file.
This commit is contained in:
parent
1e57f1c659
commit
d069e1be64
364 changed files with 50349 additions and 50346 deletions
|
|
@ -14,40 +14,40 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.pubsub;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
package org.jivesoftware.smackx.pubsub;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
public class CarExtensionProvider implements PacketExtensionProvider
|
||||
{
|
||||
|
||||
public PacketExtension parseExtension(XmlPullParser parser) throws Exception
|
||||
{
|
||||
String color = null;
|
||||
int numTires = 0;
|
||||
|
||||
for (int i=0; i<2; i++)
|
||||
{
|
||||
while (parser.next() != XmlPullParser.START_TAG);
|
||||
|
||||
if (parser.getName().equals("paint"))
|
||||
{
|
||||
color = parser.getAttributeValue(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
numTires = Integer.parseInt(parser.getAttributeValue(0));
|
||||
}
|
||||
}
|
||||
while (parser.next() != XmlPullParser.END_TAG);
|
||||
return new CarExtension(color, numTires);
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
public class CarExtensionProvider implements PacketExtensionProvider
|
||||
{
|
||||
|
||||
public PacketExtension parseExtension(XmlPullParser parser) throws Exception
|
||||
{
|
||||
String color = null;
|
||||
int numTires = 0;
|
||||
|
||||
for (int i=0; i<2; i++)
|
||||
{
|
||||
while (parser.next() != XmlPullParser.START_TAG);
|
||||
|
||||
if (parser.getName().equals("paint"))
|
||||
{
|
||||
color = parser.getAttributeValue(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
numTires = Integer.parseInt(parser.getAttributeValue(0));
|
||||
}
|
||||
}
|
||||
while (parser.next() != XmlPullParser.END_TAG);
|
||||
return new CarExtension(color, numTires);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue